Skip to content

Support task tracer#2851

Merged
wwbmmm merged 4 commits into
apache:masterfrom
chenBright:stb
Jan 6, 2025
Merged

Support task tracer#2851
wwbmmm merged 4 commits into
apache:masterfrom
chenBright:stb

Conversation

@chenBright

@chenBright chenBright commented Dec 16, 2024

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: resolve #2389 #2797

Problem Summary:

What is changed and the side effects?

Changed:

Side effects:

  • Performance effects(性能影响):

  • Breaking backward compatibility(向后兼容性):


Check List:

  • Please make sure your changes are compilable(请确保你的更改可以通过编译).
  • When providing us with a new feature, it is best to add related tests(如果你向我们增加一个新的功能, 请添加相关测试).
  • Please follow Contributor Covenant Code of Conduct.(请遵循贡献者准则).

@wwbmmm

wwbmmm commented Dec 17, 2024

Copy link
Copy Markdown
Contributor

LGTM

@chenBright chenBright force-pushed the stb branch 2 times, most recently from 6b52eba to 4b4a974 Compare December 20, 2024 02:00
@chenBright

Copy link
Copy Markdown
Contributor Author

改动了以下几点:

  1. 优化信号追踪模式,使用信号量和self-pipe代理while + sleep,延时减少50%以上。
  2. 信号追踪模式的同步变量由原来的成员变量改成每次追踪分配一个,避免没有及时执行的信号处理函数影响后续的信号追踪。
  3. 移除信号追踪期间的bvar使用,因为初次使用bvar时会访问内存,可能会导致死锁。
  4. 一个还没分配栈的bthread在旧bthread结束时被调度,会复用旧bthread栈,并直接执行,不需要jump_stack。所以,bthread状态直接从TASK_STATUS_FIRST_READY变成TASK_STATUS_RUNNING,这样才能追踪该bthread。

Comment thread src/butil/reloadable_flags.h Outdated
@wwbmmm

wwbmmm commented Dec 21, 2024

Copy link
Copy Markdown
Contributor

LGTM

@chenBright

Copy link
Copy Markdown
Contributor Author

rebase解决冲突

@wwbmmm

wwbmmm commented Apr 22, 2025

Copy link
Copy Markdown
Contributor

test email notification

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.

bthread能否引入STW进行实时打印

2 participants