我想用perf分析terasort程序。运行以下命令:
perf record -k mono $PID
perf inject -i perf.data --jit -o perf.data.jitted
perf report -i perf.data.jitted
此外,还添加了以下vm参数:
-agentpath:/usr/local/lib64/libperf-yarn-jvmti.so
这就是我从中学到的https://blog.openj9.org/2019/07/18/inspecting-openj9-performance-with-perf-on-linux-jit-compiled-methods/.
在specjbb2015或其他java程序中运行良好,但在terashort spark中遇到这个问题。
有些函数只能看到地址,不能与jitted-$pid.so关联。我确认这些函数是c2生成的jit代码。
Overhead Command Shared Object Symbol
4.93% Executor task l perf-599505.map [.] 0x0000fffdbd86982c
4.60% Executor task l perf-599505.map [.] 0x0000fffdbd86984c
3.57% Executor task l perf-599505.map [.] 0x0000fffdbd838c48
3.18% Executor task l perf-599505.map [.] 0x0000fffdbd838c34
2.81% java libjvm.so [.] PSPromotionManager::copy_to_survivor_space<false>
2.00% Executor task l perf-599505.map [.] 0x0000fffdbdaf9df0
1.59% Executor task l perf-599505.map [.] 0x0000fffdbd9cbba8
1.54% Executor task l jitted-599505-22693.so [.] class org.apache.spark.shuffle.sort.ShuffleExternalSorter.writeSortedFile(bool)
1.36% Executor task l perf-599505.map [.] 0x0000fffdbd688118
1.13% java [kernel.kallsyms] [k] clear_page
1.07% java libjvm.so [.] PSPromotionManager::process_array_chunk_work<unsigned int>
0.98% Executor task l jitted-599505-19295.so [.] class org.apache.hadoop.hdfs.DFSInputStream.read(byte[], int, int)
暂无答案!
目前还没有任何答案,快来回答吧!