feat: add TPBASE and TSD extraction for multi-thread Python unwind#11335
Open
kylewanginchina wants to merge 2 commits intomainfrom
Open
feat: add TPBASE and TSD extraction for multi-thread Python unwind#11335kylewanginchina wants to merge 2 commits intomainfrom
kylewanginchina wants to merge 2 commits intomainfrom
Conversation
238261f to
9aedb8c
Compare
Contributor
Author
|
因为之前的代码迁移,原先提交的 支持多线程python unwind的PR 所对应的代码进行了拆分修改:一部分放入ce,一部分放入ee。 拆分修改后已经进行了重新测试,具体测试结果同原先的PR |
9aedb8c to
8b983e5
Compare
rvql
reviewed
Feb 3, 2026
| // Pattern: mov XX(%rdi), %rXX or mov XX(%rsi), %rXX | ||
|
|
||
| // Look for 48 8b XX XX XX XX XX patterns (mov r64, m64) | ||
| for i in 0..code.len().saturating_sub(7) { |
Contributor
Author
There was a problem hiding this comment.
已修改,同样使用 windows(7) 优化
|
|
||
| // Read the entire header section first to parse program headers | ||
| file.seek(SeekFrom::Start(0))?; | ||
| let mut header_data = vec![0u8; 4096]; // Should be enough for headers |
Contributor
There was a problem hiding this comment.
这个文件的大小一定大于 4096 吗?也要注释说明一下不会 eof
Contributor
Author
There was a problem hiding this comment.
已添加详细注释说明 /proc/kcore 是虚拟文件,ELF header + program headers 区域始终存在且远小于 4096 字节,不会发生 EOF
| /// Thread Specific Data info for accessing per-thread PyThreadState. | ||
| #[repr(C)] | ||
| #[derive(Debug, Clone, Copy, Default)] | ||
| pub struct TSDInfo { |
Contributor
Author
There was a problem hiding this comment.
代码中已经是 TsdInfo,符合 Rust 命名规范
0575a43 to
12fc5ec
Compare
12fc5ec to
f6a2540
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is for:
This commit adds the infrastructure for multi-threaded Python stack unwinding:
Checklist
Backport to branches