forked from OP-TEE/optee_os
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ftrace: introduce CFG_FTRACE_BUF_WHEN_FULL
Function tracing can become extremely slow in case a big buffer size is used (say, CFG_FTRACE_BUF_SIZE=6000000 instead of the default 2048 bytes). This is because of the "shifting" algorithm used when the buffer is full, which copies almost the full buffer before inserting a new line. In order to mitigate this problem, this patch introduces two new methods to handle the buffer full condition: 1. Discard existing data and write new lines to the beginning of the buffer. 2. Stop adding new lines. The method can be selected at build time with CFG_FTRACE_BUF_WHEN_FULL. Supported values are "shift", "wrap" and "stop". Signed-off-by: Jerome Forissier <[email protected]> Acked-by: Jens Wiklander <[email protected]>
- Loading branch information
1 parent
c20f0d1
commit d408db9
Showing
2 changed files
with
80 additions
and
29 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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