]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC: r282866
authorhiren <hiren@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 2 Jun 2015 08:03:28 +0000 (08:03 +0000)
committerhiren <hiren@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 2 Jun 2015 08:03:28 +0000 (08:03 +0000)
commit268e1299b1600845c4c8dfaf726494a6ffc4ab10
tree396f4a90237041ac5d50b3c22723611dd36e7700
parenta89ff91757f199070c6b13261f3e69e1b437b7a8
MFC: r282866

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
Submitted by: stas

git-svn-id: svn://svn.freebsd.org/base/stable/10@283905 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
usr.sbin/pmcstat/pmcstat_log.c