SWD for Time Profiling if no ETM Time Stamping is available

Hi to you all, I'm using a LPC437 microcontroller (cortex M4) for a real-time application.
I would like to measure the performance of a function I wrote in C, i.e. know how much time does the execution takes.
Unfortunately my LPC4370 is not supporting ETM Time Stamping.
I wonder if I could still use SWD debugging to do this? Can anyone point me to example code?