-
Notifications
You must be signed in to change notification settings - Fork 816
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
why async-profiler cpu event less than perf #801
Comments
Attached graphs are not helpful to me, sorry. |
run commandasync-profiler command:
perf command
expect behaviourperf should only a litter higher than async-profiler. true behavioursometimes the perf result would much higher than async-profiler. most on function unsafeParkHook. version
|
after remove wall type of async profiler. the cpu cost is much is return to normal. the process have 128 thread:
the wall type would cost much cpu even for a java process which cost small cpu. |
What happen if you lower the interval for wall to the default value? --wall 200ms seems pretty high here |
What exactly do you compare and how do you do that? |
@zdyj3170101136 another important consideration: More info on the timer configuration used by the kernel for it, at https://github.com/torvalds/linux/blob/93f5de5f648d2b1ce3540a4ac71756d4a852dc23/kernel/events/core.c#L11109C22-L11109C22. |
@franz1981 When It's still not clear to me what OP compares, so I can't really comment on that. As a side note: I often see people using
|
Thanks @apangin for the clarification, I didn't knew that --total would have used the configured period to make the absolute values to match what SVG flamegraphs produced out of perf data does! For
Fully agree, looking at the kernel code, HW events indeed require adjustments for each counter overflow (and during throttling too, it seems, which make sense).
I tends to agree, although HW events which does have correlation with the processor frequency and running on wildly tuned machines (I usually use tuned with network latency profiles, fixed frequencies, etc etc for sake of avoiding frequency fluctuations and/or weird processor idle states...but the world have plenty of unconfigured HW) could benefit from perioding re-evaluation of period, or they won't have uniform distribution... |
@zdyj3170101136 Do you have anything to add wrt. to the question or can I close the issue? |
i started perf and async-profiler on same process.
the higher line is perf and lower line is async profiler:
and sees async-profiler always less than perf.
the perf result:
the async profiler result:
The text was updated successfully, but these errors were encountered: