Comments (7)
There are two possible explanations:
-
Hotspot is indeed sometimes moving stuff around, so numbers may get inaccurate after a while because the map file is appended to during a run, restarting
perf top
should pickup the current data -
Currently the map file contains only "top-level" methods into which a lot of smaller methods may have been inlined. This means that an entry for a method in the profile may in fact serve as a kind of container for everything that was inlined into the method as well. I've got a local version of the agent that emits more accurate map-files which also specifies for every part of a method which method was inlined at this PC.
from perf-map-agent.
Thanks β I believe it was 1) in this case. I actually kinda like 2) as it is: perf top shows items with a reasonably large granularity :)
from perf-map-agent.
I'm still seeing some strange artifacts in perf top (started fresh) that don't fit my mental model of the application and do not correlate with what JMC reports as hotspots. Not sure how to go further with this observation, as various profilers seem to have very different sampling biases. My understanding was that traditional java profilers (e.g. YourKit, JProfiler, etc) can only sample at safepoints, which makes them very inaccurate (our application has low enough latency for this bias to be obviously wrong). JMC seems to be doing a much better job, and I expected perf to be quite close.
from perf-map-agent.
You should be able to track (re)compilations with the -XX:+LogCompilation
flag. This may offer some advice if address ranges were used several times. Another (hardcore) way of checking results would be to use -XX:+PrintAssembly
and log the assembly into a file. Then go through some of the entries which perf report
reports in its more verbose output modes and check the actual addresses against the disassembly if it makes more sense. Also, I've read that the addresses reported by the performance counters are not completely accurate so there could be a slight skew that may associate a sample with the wrong method (IMO only relevant for very small methods).
from perf-map-agent.
I debugged these and found that the dynamic ordering of the map file confused perf_events. If I took the map file and cleaned it up (removed stale entries, sorted), then perf_events would show correct symbols. My program to do this is https://github.com/brendangregg/Misc/blob/master/perf_events/perfmaptidy.pl, however, Johannes just updated perf-map-agent to dump the map file on-demand, which hopefully clears the issue (and my perfmaptidy.pl program should not be needed).
from perf-map-agent.
Is there a way to check this (or documentation on the expected format of the perm-<pid>.map
file? As we are now generating the whole file in one go, we could also sort entries by address if that's required.
from perf-map-agent.
As @brendangregg noted above this should be fixed by now.
from perf-map-agent.
Related Issues (20)
- 'jvmticmlr.h' file not found HOT 1
- perf script using perf-java-report-stack output will get "Misordered timestamps: 0"
- perf-map-agent as jvmti agent on start HOT 4
- Unable to load agent sence Premain-Class manifest attribute is missing HOT 1
- Perf not listing more than 1 line in JVM stack HOT 4
- Lack of perf PMU event HOT 1
- Some C stack frames with Java ancestor not correctly shown HOT 9
- Improve support for JSVC
- bump up to new version for new release?
- Clarify license of shell scripts
- JDK inline info not accurate in all cases HOT 1
- when do i have to create the map HOT 2
- time to generate map file HOT 2
- ./bin/dtrace-java-record-stack is not working HOT 1
- Can't compile on Raspberry 4 with jdk 8u181
- Trouble to attach with high PID value HOT 1
- Running create-java-perf-map.sh in different containers in the same pod reports an errorοΌ HOT 2
- java.io.IOException: No such process HOT 1
- bjdump: /tmp/perf-1390290.map: File format not recognized HOT 3
- Cross-compiling for Aarch64 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from perf-map-agent.