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

"java 19983 cycles:" not matched as the event header - perf v3.2.28 #95

Closed
techtony2018 opened this issue Jul 7, 2016 · 8 comments
Closed

Comments

@techtony2018
Copy link

techtony2018 commented Jul 7, 2016

Environment:
hostname : xguan-ubuntu
os release : 3.2.0-31-generic
perf version : 3.2.28
arch : x86_64
cmdline : /usr/bin/perf_3.2.0-31 record -F 99 -p 19982 -g sleep 30

...

The perf.out:

java 19983 cycles:
7f7241fbe6d8 arrayOopDesc::base(BasicType) const (/home/xguan/opt/jdk1.8.0_112/jre/lib/amd64/server/libjvm.so)
7f7241239aec writeBytes (/home/xguan/opt/jdk1.8.0_112/jre/lib/amd64/libjava.so)
7f724123176f Java_java_io_FileOutputStream_writeBytes (/home/xguan/opt/jdk1.8.0_112/jre/lib/amd64/libjava.so)
7f722d119786 Ljava/io/FileOutputStream;::writeBytes (/tmp/perf-19982.map)
7f722d142778 Ljava/io/PrintStream;::print (/tmp/perf-19982.map)
7f722d12e1d4 LBusy;::main (/tmp/perf-19982.map)
7f722d0004e7 call_stub (/tmp/perf-19982.map)
7f72421d2d76 JavaCalls::call_helper(JavaValue_, methodHandle_, JavaCallArguments_, Thread_) (/home/xguan/opt/jdk1.8.0_112/jre/lib/amd64/server/libjvm.so)
7f72421ed566 jni_invoke_static(JNIEnv__, JavaValue_, jobject, JNICallType, jmethodID, JNI_ArgumentPusher_, Thread_) (/home/xguan/opt/jdk1.8.0_112/jre/lib/amd64/server/libjvm.so)
7f72421f987a jni_CallStaticVoidMethod (/home/xguan/opt/jdk1.8.0_112/jre/lib/amd64/server/libjvm.so)
7f724309ebdf JavaMain (/home/xguan/opt/jdk1.8.0_112/lib/amd64/jli/libjli.so)
7f72432b4e9a start_thread (/lib/x86_64-linux-gnu/libpthread-2.15.so)

When I tried:

./stackcollapse-perf.pl perf.out

Unrecognized line: java 19983 cycles: at ./stackcollapse-perf.pl line 264, <> line 3609.
Use of uninitialized value $pname in string eq at ./stackcollapse-perf.pl line 246, <> line 3610.

And the fix is to tweak the regular expression in line 177.

@brendangregg
Copy link
Owner

Sorry, the regexp recently changed before I had enabled a test suite. Hopefully this is the last regexp fix, now that we have automated tests! :)

I'll dig up a 3.2 perf output and add it to the test suite.

//CC @skarcha

brendangregg added a commit that referenced this issue Jul 7, 2016
@techtony2018
Copy link
Author

Thanks!
That was quick! 👍

@skarcha
Copy link
Contributor

skarcha commented Jul 7, 2016

Ops! I have the patch. Expect a PR soon. Thanks for the CC @brendangregg

@brendangregg
Copy link
Owner

I did add a couple of new test files to cover it, perf-funcab-cmd-01.txt and perf-funcab-pid-01.txt. I probably broke the test system as I haven't added the results/ files yet.

@skarcha
Copy link
Contributor

skarcha commented Jul 7, 2016

I see. I used them to test. Thanks... ;)

skarcha added a commit to skarcha/FlameGraph that referenced this issue Jul 7, 2016
skarcha added a commit to skarcha/FlameGraph that referenced this issue Jul 7, 2016
@techtony2018
Copy link
Author

Just edited the original post to rid of the bold formatting brought by '#'s

@skarcha
Copy link
Contributor

skarcha commented Jul 7, 2016

Thanks @guanxiaohua. I've just do the PR.

brendangregg added a commit that referenced this issue Jul 7, 2016
@brendangregg
Copy link
Owner

should be fixed by #96.

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

3 participants