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

bjdump: /tmp/perf-1390290.map: File format not recognized #92

Open
cyberspicecai opened this issue Apr 4, 2023 · 3 comments
Open

bjdump: /tmp/perf-1390290.map: File format not recognized #92

cyberspicecai opened this issue Apr 4, 2023 · 3 comments

Comments

@cyberspicecai
Copy link

Hi, Authors

I want to profile the instruction of the code of https://github.com/mkyong/jmh-benchmark.git
and find that: bjdump: /tmp/perf-1390290.map: File format not recognized.

How reproduce:
1, use mvn package to compile the jmh-benchmark
2, numactl -C 3 -m 0 java -jar target/benchmarks.jar loopFor #run the test case.
or this method:
perf record -v -g -k 1 numactl -C 3 -m 0 java -agentpath:/usr/lib64/libperf-jvmti.so -jar target/benchmarks.jar loopFor
3, perf the thread which is from pgrep java
4, ./create-java-perf-map.sh 3490983 -F 99 #to output the java jit map.
5, perf report -i /tmp/pid-3490983.data will show the error.

thanks.
@jrudolph
Copy link
Member

jrudolph commented Apr 4, 2023

Not sure what the issue is. For JMH you might not even need the agent as JMH has built-in support for perf profiling. E.g. see https://github.com/Valloric/jmh-playground/blob/master/src/jmh/java/org/openjdk/jmh/samples/JMHSample_35_Profilers.java

@cyberspicecai
Copy link
Author

Not sure what the issue is. For JMH you might not even need the agent as JMH has built-in support for perf profiling. E.g. see https://github.com/Valloric/jmh-playground/blob/master/src/jmh/java/org/openjdk/jmh/samples/JMHSample_35_Profilers.java

thanks for your info, jrudolph.

@cyberspicecai
Copy link
Author

Hi, Rudolph
I refer to your link. and use the built-in profiling. Good stuff.
but I want to go further into the cpu instruction info as that the normal linux perf does. And I got the following profiling content:
....[Hottest Region 1]..............................................................................
c2, level 4, com.mkyong.benchmark.BenchmarkLoop::loopFor, version 399 (180 bytes)

       0x00007f8664a40d90: 004d 8bd0 
       0x00007f8664a40d94: ;*getfield size {reexecute=0 rethrow=0 return_oop=0}
                           ; - java.util.ArrayList::size@1 (line 253)
                           ; - com.mkyong.benchmark.BenchmarkLoop::loopFor@7 (line 53)
       0x00007f8664a40d94: 418b 6a10 | 85ed 660f | 1f44 0000 | 0f8e d700 
       0x00007f8664a40da4: ;*if_icmpge {reexecute=0 rethrow=0 return_oop=0}
                           ; - com.mkyong.benchmark.BenchmarkLoop::loopFor@12 (line 53)
       0x00007f8664a40da4: 0000 4885 | d20f 8481 | 0100 0045 | 33c9 eb0f | 0f1f 8400 | 0000 0000 | 6666 6690 

1.70% 0x00007f8664a40dc0: ;*aload_0 {reexecute=0 rethrow=0 return_oop=0}
; - com.mkyong.benchmark.BenchmarkLoop::loopFor@15 (line 54)
1.70% 0x00007f8664a40dc0: 448b cd45
0x00007f8664a40dc4: ; {metadata('java/util/ArrayList')}
0x00007f8664a40dc4: 8b58 0841 | 81fb c0e0 | 0000 0f85 | fc00 0000
1.52% 0x00007f8664a40dd4: ;*invokeinterface get {reexecute=0 rethrow=0 return_oop=0}
; - com.mkyong.benchmark.BenchmarkLoop::loopFor@20 (line 54)
1.52% 0x00007f8664a40dd4: 4d8b d045
0x00007f8664a40dd8: ;*getfield size {reexecute=0 rethrow=0 return_oop=0}
; - java.util.ArrayList::get@2 (line 427)
; - com.mkyong.benchmark.BenchmarkLoop::loopFor@20 (line 54)
0x00007f8664a40dd8: 8b5a 100f | 1f44 0000 | 4585 db0f | 8c0b 0100
0x00007f8664a40de8: ;*invokestatic checkIndex {reexecute=0 rethrow=0 return_oop=0}

 Would you pls show me how to get the cpu-related instruction running info?

 Thanks a lot.

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