你好,想请教个问题。我看了最佳实践,想抓了火焰图来分析代码。
systemtap是已经确定可以成功运行了。
我先是使用ngx-sample-lua-bt,结果运行失败
root@iZwz9jfo9qu8vy1uevvxudZ /home/tyler/openresty-systemtap-toolkit-master> ./ngx-sample-lua-bt -p 13189 --luajit20 -t 5 > a.bt
WARNING: cannot find module /home/tyler/openresty/luajit/lib/libluajit-5.1.so.2.1.0 debuginfo: No DWARF information found [man warning::debuginfo]
WARNING: Bad $context variable being substituted with literal 0: identifier '$L' at <input>:17:30
source: lua_states[my_pid] = $L
^
semantic error: while processing function frame_ftsz
semantic error: type definition 'TValue' not found in '/home/tyler/openresty/luajit/lib/libluajit-5.1.so.2.1.0': operator
'@cast' at :62:12
source: return @cast(tvalue, "TValue", "/home/tyler/openresty/luajit/lib/libluajit-5.1.so.2.1.0")->fr->tp->ftsz
^
Pass 2: analysis failed. [man error::pass2]
Number of similar warning messages suppressed: 100.
Rerun with -v to see them
我以为是ngx-sample-lua-bt 不支持luajit2.0的原因,然后就去找了lj-lua-stack.sxx来跑
结果还是错误
root@iZwz9jfo9qu8vy1uevvxudZ /home/tyler/stapxx-master/samples> ./lj-lua-stacks.sxx -x 13189 > a.bt
Found exact match for libluajit: /home/tyler/openresty/luajit/lib/libluajit-5.1.so.2.1.0
WARNING: cannot find module /home/tyler/openresty/luajit/lib/libluajit-5.1.so.2.1.0 debuginfo: No DWARF information found [man warning::debuginfo]
semantic error: while processing function luajit_G
semantic error: type definition 'lua_State' not found in '/home/tyler/openresty/luajit/lib/libluajit-5.1.so.2.1.0': operator
'@cast' at stapxx-mRAyWhmH/luajit.stp:162:12
source: return @cast(L, "lua_State", "/home/tyler/openresty/luajit/lib/libluajit-5.1.so.2.1.0")->glref->ptr32
^
Pass 2: analysis failed. [man error::pass2]
Number of similar warning messages suppressed: 628.
Rerun with -v to see them.
看起来都是我的libluajit库有问题?