- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm trying to profile a medium size program with valgrind. All the
source files are compiled with -g, then I run the code with
valgrind --tool=callgrind my-executable
When I look at the callgrind results using "kcachegrind", for the main
program and for few subroutines I'm able to see the source code with
profiling information, but for most subroutines I see "There is no
source available for the following function ... This is because no
debug information is present. Recompile source and redo the profile
run".
Now, I don't know whether I'm doing something wrong with ifort or with
valgrind, so I'm starting asking here. Is there a way to make sure
that ifort generates all debugging information about *all* the
subroutines in the code, besides using -g ? Or does -g already
provides all the available debug information (in which case I should
look into valgrind options) ?
Thank you very much,
Marco Restelli
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
inlining can remove functions and subroutines. Either compile at -g -O0 or disable inlining.
linux: -finstrument-functions -g
Mac: finstrument-functions g save-temps
Make sure to see past cautions about valgrind use with Fortran - this tool is not Fortran friendly and will give false positives in the Fortran runtime library.
linux: -finstrument-functions -g
Mac: finstrument-functions g save-temps
Make sure to see past cautions about valgrind use with Fortran - this tool is not Fortran friendly and will give false positives in the Fortran runtime library.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page