Bug 29904 - Line numbers in profiler --traces output would be helpful
Summary: Line numbers in profiler --traces output would be helpful
Status: RESOLVED INVALID
Alias: None
Product: Runtime
Classification: Mono
Component: Profiler ()
Version: unspecified
Hardware: All All
: Normal enhancement
Target Milestone: Future Cycle (TBD)
Assignee: Alex Rønne Petersen
URL:
Depends on:
Blocks:
 
Reported: 2015-05-09 13:38 UTC by Gary Briggs
Modified: 2017-12-06 15:58 UTC (History)
6 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED INVALID

Description Gary Briggs 2015-05-09 13:38:58 UTC
This is a feature request.

At the moment I'm working on a project one very large function. When I run it under the profiler and then use "mprof-report --traces" to see what the callstacks are, I get a number of hotspots identified that I can't actually tell *which* calls from that function are the offenders.

For example, one function is called a billion times from this function. It's a pretty cheap call, but I'd still like to hoist the call out of the many-nested loops and store its return value once. Things is, there's a *lot* of loops from which it might be being called.

Long term, the plan is to rearchitect the code. But in the meantime, I still can't figure out from the profile output which calls are the main offenders.
Comment 1 Rodrigo Moya 2015-05-09 16:58:09 UTC
Yes, that information is not available in the MLPD file generated by the runtime, but would be indeed great to have, so moving to the runtime team, although this might take some time to implement AFAIK.
Comment 2 Alex Rønne Petersen 2017-10-08 23:49:09 UTC
In theory, this shouldn't be super hard or anything. We should be able to use the same infrastructure we use to get line numbers for stack traces in managed exceptions. The only real question is how best to encode that information in the log file without using a ton of space.

Not sure when I'll get around to this, but it's definitely something we want at some point.
Comment 3 Alex Rønne Petersen 2017-12-06 15:58:13 UTC
Moving this enhancement request to GitHub issues: https://github.com/mono/mono/issues/6185