-
Notifications
You must be signed in to change notification settings - Fork 812
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 Cannot StackTrace Be Found Using stackTraceId After LiveObject Is Enabled? #928
Comments
After liveobject is enabled,Occasional occurrence stackTrace can't be found in dictionary |
Thank you for your interest in async-profiler.
|
Thanks for the reply,The questions are as follows: In the case of disable liveobject , modes.LIVEOBJECT = false ,The specific command line code is as follows,The memory collection report is correct. Same situation,Use IDEA to open the incorrect .jfr file and choose Events-java application-Allocation in new TLAB - Stack Trace. Many stack traces are empty, It should be non-empty in the right case. I tried different JDK versions, such as JDK11 JDK17.0.1 and so on have this problem. (I can't upload images to github due to permissions.) start,jfr=7,jstackdepth=100,threads=true,event=cpu,interval=50ms,alloc=512k,wall=50ms,live std::stringstream command; The Java backend reports the following error: The Java backend reads the JFR code as follows,error is line StackTrace stackTrace = (StackTrace)stackTraces.get((long)id); private Line[] getLines(JfrReader jfrReader, int stackTraceId, Dictionary stackTraces) {
|
I suspect there is a bug in this line of code. Why is the second parameter of this recordSample 0 when live is enabled? void ObjectSampler::recordAllocation(jvmtiEnv* jvmti, JNIEnv* jni, EventType event_type,
} |
This exceptions does not come from async-profiler. It's a part of Huawei software. |
I found a case when a |
rightjfrfile.zip |
OK, I understand the problem. Both of these .jfr files are valid, but the second one indeed has allocation events without stack traces. The reason is that async-profiler does not currently support "normal" allocation profiling together with "live" object profiling. When |
Thank you, I understand. I found that changing the second parameter of the function (recordSample(NULL, 0, event_type, &event)) from 0 to event. _total_size, which fixes this problem. Could you please change it like this? void ObjectSampler::recordAllocation(jvmtiEnv* jvmti, JNIEnv* jni, EventType event_type, jobject object, jclass object_klass, jlong size) { |
This will break live object profiling. |
Thank you. I look forward to solving this problem soon. |
No description provided.
The text was updated successfully, but these errors were encountered: