Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

time to generate map file #84

Closed
navyxliu opened this issue Sep 30, 2019 · 2 comments
Closed

time to generate map file #84

navyxliu opened this issue Sep 30, 2019 · 2 comments

Comments

@navyxliu
Copy link

Hello, Authors,
Thank you to open-source this projects. The agent and handy scripts are extremely helpful for me.

I have a problem about JIT-ed code. I end up with a lot of PCs which point to nowhere but fall in the range of map files. I interpret it in this way: the symbols in the map file are not accurate.

I have a question about this line. It seems that two statements happen in sequence.

sudo perf record -F $PERF_RECORD_FREQ -o $PERF_DATA_FILE -g -p $* -- sleep $PERF_RECORD_SECONDS

That is to say, the script generates map file right after 'perf record' has done. Why not make them run in parallel? In current model, will agent has a skewed view? or I have to make sure my profiling program enter a stable state ?

@jrudolph
Copy link
Member

It works indeed best in steady state. The problem is otherwise that a profiling run takes some time but we can only provide a single map file which contains a snapshot of the current mappings. If anything changes during the profiling run that snapshot would not be current.

#27 has some ideas how mapping could work if new entries are written during the whole lifetime of the process but afaik no one has looked into what would be needed to output the required format.

If the mapping itself is correct but somewhat inaccurate adding -XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints parameters can help as well.

Alternatively, I often use async-profiler if I need to profile non-steady state JVMs.

@navyxliu
Copy link
Author

@jrudolph thank you!
I got it. you are right. Actually, I run dacapo benchmark. I manage to skip many warmup iterations and the results become more reasonable. meanwhile, let me try to use async-profiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants