note: support asynchronous sched_note_printf output#13949
Conversation
|
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. |
ec28b4a to
5fa1e74
Compare
|
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. |
5fa1e74 to
d07ac75
Compare
|
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. |
|
fix the conflict |
d07ac75 to
2ff30ee
Compare
|
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>
2ff30ee to
4c8bb58
Compare
|
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. |
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