Skip to content

note: support asynchronous sched_note_printf output#13949

Merged
xiaoxiang781216 merged 2 commits into
apache:masterfrom
Gary-Hobson:note-async
Oct 9, 2024
Merged

note: support asynchronous sched_note_printf output#13949
xiaoxiang781216 merged 2 commits into
apache:masterfrom
Gary-Hobson:note-async

Conversation

@Gary-Hobson

Copy link
Copy Markdown
Contributor

Summary

Change 1: Replace sched_note_printf with sched_note_bprintf to delay string formatting and improve sched_note_printf execution speed (bprintf does not format parameters, but only parses the format string and saves parameters for delayed formatting)

Change 2: Supports obtaining variable parameter types at compile time and saving function parameters at runtime without parsing the format string. This method does not require parsing the format string, so the execution speed will be faster than bprintf

These two functions can use sched_note_printf to replace syslog, providing a faster log storage method.
And it does not rely on the format string. The format string in syslog can be removed to reduce the size of the final bin file.

Impact

none

Testing

sim

@github-actions github-actions Bot added the Area: OS Components OS Components issues label Oct 8, 2024
@github-actions

github-actions Bot commented Oct 8, 2024

Copy link
Copy Markdown

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@github-actions github-actions Bot added the Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces. label Oct 8, 2024
@github-actions

github-actions Bot commented Oct 8, 2024

Copy link
Copy Markdown

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@github-actions

github-actions Bot commented Oct 9, 2024

Copy link
Copy Markdown

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@xiaoxiang781216

Copy link
Copy Markdown
Contributor

fix the conflict

@github-actions

github-actions Bot commented Oct 9, 2024

Copy link
Copy Markdown

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Do not format immediately when calling sched_note_printf, but delay formatting until dump trace.
After turning on SYSTEM_NOTE, similar asynchronous syslog functions can be achieved.

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
@github-actions

github-actions Bot commented Oct 9, 2024

Copy link
Copy Markdown

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: OS Components OS Components issues Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants