Skip to content

[simpleperf] Why do we need to read jit/dex descriptors 3 times? #1956

Answered by yabinc
RajatChauhan-0575 asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for the question!
The understandings of for item 1 and 3 are correct.
But for item 2, when we read a sample record, we check if we have monitored this process before, by checking pids_with_art_lib_[r.tid_data.pid]. If not, we call MonitorProcess() to monitor this process, and call ReadProcess() to get the latest JIT/Dex entries once for the current sample. The next time we see a sample from the same process, pids_with_art_lib_[r.tid_data.pid]=true, so we won't call MonitorProcess() and ReadProcess() again. The code is https://cs.android.com/android/platform/superproject/main/+/main:system/extras/simpleperf/JITDebugReader.cpp;l=259;bpv=1;bpt=1.

So simpleperf isn't reading the latest…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@RajatChauhan-0575
Comment options

@yabinc
Comment options

yabinc Oct 25, 2023
Collaborator

@RajatChauhan-0575
Comment options

@yabinc
Comment options

yabinc Oct 26, 2023
Collaborator

@RajatChauhan-0575
Comment options

Answer selected by RajatChauhan-0575
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants