本文介绍了如何使用uprobe跟踪OpenJDK HotSpot源代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我尝试按照链接在此示例,Tracing func_abc() in my test program, and including user-level stacks:# ./uprobe -s p:/root/func_abc:func_cTracing uprobe func_c (p:func_c /root/func_abc:0x4f4). Ctrl-C to end. func_abc-25394 [000] d... 19603250.054040: func_c: (0x4004f4) func_abc-25394 [000] d... 19603250.054056: <user stack trace> => <00000000004004f4> => <0000000000400527> => <0000000000400537> => <00007fca9f0e376d> func_abc-25394 [000] d... 19603251.054250: func_c: (0x4004f4) func_abc-25394 [000] d... 19603251.054266: <user stack trace> => <00000000004004f4> => <0000000000400527> => <0000000000400537> => <00007fca9f0e376d>^CEnding tracing...我想探测函数 minor_collection_begin 但它显示错误:缺少符号。I want to probe function minor_collection_begin but it shows ERROR: missing symbol.root@wxf:/home/wxf/perf-tool/perf-tools/bin# ./uprobe -s p:/home/wxf/9dev/build/linux-x86_64-normal-server-slowdebug/jdk/bin/java:AdaptiveSizePolicy::minor_collection_beginERROR: missing symbol "minor_collection_begin" in /home/wxf/9dev/build/linux-x86_64-normal-server-slowdebug/jdk/bin/javaroot@wxf:/home/wxf/perf-tool/perf-tools/bin# ./uprobe -s p:/home/wxf/9dev/build/linux-x86_64-normal-server-slowdebug/jdk/bin/java:minor_collection_beginERROR: missing symbol "minor_collection_begin" in /home/wxf/9dev/build/linux-x86_64-normal-server-slowdebug/jdk/bin/java我经常搜索并发现它与之相关 libjvm.so 。但是,我不知道下一步该做什么。I search a lot and find it is related to libjvm.so. However, I don't know what to do next.wxf@wxf:/home/wxf/adjustableMaxHeapSize_9jdk_prj/9dev$ find -name "libjvm.so"./build/linux-x86_64-normal-server-slowdebug/support/modules_libs/java.base/server/libjvm.so./build/linux-x86_64-normal-server-slowdebug/hotspot/variant-server/libjvm/gtest/libjvm.so./build/linux-x86_64-normal-server-slowdebug/jdk/lib/server/libjvm.so推荐答案 C ++符号是 mangled 。你找不到 minor_collection_begin 。 的错位符号名称void AdaptiveSizePolicy :: minor_collection_begin()是C++ symbols are mangled in binary objects. You won't find minor_collection_begin. The mangled symbol name for void AdaptiveSizePolicy::minor_collection_begin() is_ZN18AdaptiveSizePolicy22minor_collection_beginEv 这篇关于如何使用uprobe跟踪OpenJDK HotSpot源代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-03 04:09