Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2009-01

Profiling

8 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mattias Gaertner

I need to profile lazarus applications under linux. I tried gprof, but it is broken since years and shows no record. I tried valgrind (callgrind), but it slows down the execution by factor 80, making it unusable.

I found the following page, but it does not help here: http://wiki.lazarus.freepascal.org/Profiling

How can I profile under linux?

Mattias

Reply by email

Jonas Maebe
to Mattias Gaertner
Mattias Gaertner wrote
I need to profile lazarus applications under linux. I tried gprof, but it is broken since years and shows no record.

Neither does the bug repository show any record of open bugs against - pg on Linux.

I found the following page, but it does not help here: http://wiki.lazarus.freepascal.org/Profiling How can I profile under linux?

I've used qprof successfully in the past (not for FPC programs, but for other things). It's a sampling-based profiler, so it shouldn't slow down things too much.

Jonas

Reply by email

Graeme Geldenhuys
to Jonas Maebe
Jonas Maebe wrote 8 lines
On 26 Jan 2009, at 22:49, Mattias Gaertner wrote: > I need to profile lazarus applications under linux. > I tried gprof, but it is broken since years and shows no record. Neither does the bug repository show any record of open bugs against -pg on Linux.

I can confirm with Mattias. I tried over a year ago to do profiling using gprof. It always generated a empty (0 byte) file. Nothing else. I posted messages to the mailing list and was told to try valgrind instead. It issues with gprof was known at the time.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Jonas Maebe
to Graeme Geldenhuys
Graeme Geldenhuys wrote
I can confirm with Mattias. I tried over a year ago to do profiling using gprof. It always generated a empty (0 byte) file. Nothing else. I posted messages to the mailing list and was told to try valgrind instead. It issues with gprof was known at the time.

If there is no bug report about it, it's very likely that it will be forgotten over time (as in this case, apparently -- I indeed seem to remember that at one point I knew about this).

Jonas

Reply by email

Michael Van Canneyt
to Jonas Maebe
Jonas Maebe wrote 11 lines
On 27 Jan 2009, at 10:49, Graeme Geldenhuys wrote: >I can confirm with Mattias. I tried over a year ago to do profiling >using gprof. It always generated a empty (0 byte) file. Nothing else. >I posted messages to the mailing list and was told to try valgrind >instead. It issues with gprof was known at the time. If there is no bug report about it, it's very likely that it will be forgotten over time (as in this case, apparently -- I indeed seem to remember that at one point I knew about this).

There is indeed a problem. I submitted a bugreport with a test program.

The program does not execute correctly when compiled with -pg.

Michael.

Reply by email

Mattias Gärtner
to Jonas Maebe: Neither does the bug repository show any record of open bugs against - pg on Linux. I've…

Zitat von Jonas Maebe :

Show quoted text 8 lines
On 26 Jan 2009, at 22:49, Mattias Gaertner wrote: > I need to profile lazarus applications under linux. > I tried gprof, but it is broken since years and shows no record. Neither does the bug repository show any record of open bugs against - pg on Linux.

Sorry. I thought the problem is known and the fpc team prefers valgrind. I saw that Michael created a bug report, with major urgent priority - wow.

Show quoted text 8 lines
> I found the following page, but it does not help here: > http://wiki.lazarus.freepascal.org/Profiling > > How can I profile under linux? I've used qprof successfully in the past (not for FPC programs, but for other things). It's a sampling-based profiler, so it shouldn't slow down things too much.

Yes, that's why I prefer gprof and used it a lot in the past.

Mattias

Reply by email

Jonas Maebe
to Mattias Gärtner
Mattias Gärtner wrote 7 lines
Zitat von Jonas Maebe : > I've used qprof successfully in the past (not for FPC programs, but > for other things). It's a sampling-based profiler, so it shouldn't > slow down things too much. Yes, that's why I prefer gprof and used it a lot in the past.

Note that I was talking about qprof (http://www.hpl.hp.com/research/linux/qprof/ ), not gprof. As opposed to qprof (and Shark on Mac OS X), gprof is not a sampling-based profiler (gprof traces the entire execution).

Jonas

Reply by email

Marco van de Voort
to Michael Van Canneyt: There is indeed a problem. I submitted a bugreport with a test program. The program does…

In our previous episode, Michael Van Canneyt said:

Show quoted text 7 lines
> If there is no bug report about it, it's very likely that it will be forgotten > over time (as in this case, apparently -- I indeed seem to remember that at > one point I knew about this). There is indeed a problem. I submitted a bugreport with a test program. The program does not execute correctly when compiled with -pg.

Has it worked at all for 64-bit ? Otherwise maybe the title of the bugreport should be corrected.

Reply by email