freebsd-dev/usr.sbin/pmcstat
Stanislav Sedov c21fd5b663 Fix pmcstat symbol resolution for userland processes.
When examining existing processes pmcstat fails to
correctly determine the locations of executable sections
of the process due to a miscalculated virtual load address.
This does not affect the newly launched processes as the
same value passed as a "start address" to the pmcstat_image_link()
thus nullifying the effect of it.  The issue manifests itself
in processes not being reported in the pmcstat(8) output and
"dubious frames" being reported.

Fix it for now by ignoring all the sections except the executable
one.  This won't fix the issue for objects with multiple
executable sections but helps in majority of real world usecases.
The real solution would be to modify the MAP-IN event to include
the appropriate load address so pmcstat(8) won't have to manually
parse object files to try to determine it.

PR:		198147, 198148
Reviewed by:	jhb, rpaulo
MFC after:	2 weeks
2015-05-13 18:52:18 +00:00
..
Makefile Convert usr.sbin to LIBADD 2014-11-25 16:57:27 +00:00
pmcpl_annotate_cg.c Add correct attributions. 2014-02-24 02:47:47 +00:00
pmcpl_annotate_cg.h Add correct attributions. 2014-02-24 02:47:47 +00:00
pmcpl_annotate.c
pmcpl_annotate.h
pmcpl_callgraph.c When an asm location cannot be resolved to a function the cost 2010-09-03 13:54:02 +00:00
pmcpl_callgraph.h
pmcpl_calltree.c More -Wmissing-variable-declarations fixes. 2012-10-19 14:49:42 +00:00
pmcpl_calltree.h
pmcpl_gprof.c Spelling fixes for usr.sbin/ 2011-12-30 10:58:14 +00:00
pmcpl_gprof.h
pmcstat_log.c Fix pmcstat symbol resolution for userland processes. 2015-05-13 18:52:18 +00:00
pmcstat_log.h More -Wmissing-variable-declarations fixes. 2012-10-19 14:49:42 +00:00
pmcstat_top.h
pmcstat.8 Use the kern.bootfile sysctl to set the default kernel path rather than 2015-05-08 16:02:31 +00:00
pmcstat.c Use the kern.bootfile sysctl to set the default kernel path rather than 2015-05-08 16:02:31 +00:00
pmcstat.h Update default callchain depth to 16 to match kernel 2014-05-30 20:12:47 +00:00