Skip to content

fix:ebpf lua frame display order#11265

Closed
qlndzt wants to merge 354 commits intodeepflowio:mainfrom
qlndzt:feat/fix-lua-frame-order
Closed

fix:ebpf lua frame display order#11265
qlndzt wants to merge 354 commits intodeepflowio:mainfrom
qlndzt:feat/fix-lua-frame-order

Conversation

@qlndzt
Copy link
Collaborator

@qlndzt qlndzt commented Jan 19, 2026

This PR is for:

Fixes "wrong lua frame display order"

Steps to reproduce the bug

  • ...

Changes to fix the bug

  • reverse the original leaf -> root order to root -> leaf order
  • ...

Affected branches

  • main

Checklist

  • Added unit test to verify the fix.
  • Verified eBPF program runs successfully on linux 4.14.x.
  • Verified eBPF program runs successfully on linux 4.19.x.
  • Verified eBPF program runs successfully on linux 5.4.x.

let mut buf_vec = Vec::with_capacity(frame_count as usize * 32);

for &encoded in raw {
// We want the root->leaf order here (folded stacks are "root;...;leaf").
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里有个疑问,对应帧就是应该放在栈顶的吗?

Copy link
Collaborator Author

@qlndzt qlndzt Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的,对应帧是调用栈栈顶,raw 是从当前执行帧开始回溯收集的(leaf → root)
但最终profiler.folded里是 root;...;leaf顺序,所以这里输出做了反转

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我的意思是解释器栈帧(下图中黄色部分)和原生栈帧(其他部分),解释器栈帧是否预期是在栈顶,原生栈帧预期是在栈底?
image

@kylewanginchina
Copy link
Contributor

下面这种没有解释器栈帧的情况有没有定位到原因?
img_v3_02tv_a72fea5b-7588-40c7-8c2f-8370856ca2cg

askyrie and others added 28 commits February 13, 2026 18:57
…deepflowio#10699)

Previously we only supported targets that were dynamically linked (using
shared libssl/libcrypto) when locating hook offsets for uprobe-based
decryption. Add support for targets where OpenSSL is statically linked
into the binary.

Changes:
- Add logic to detect and handle statically linked OpenSSL in target
  binaries.
@qlndzt qlndzt force-pushed the feat/fix-lua-frame-order branch 4 times, most recently from ebda930 to cb2586b Compare February 13, 2026 19:21
@qlndzt qlndzt closed this Feb 13, 2026
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

Successfully merging this pull request may close these issues.