Defines | |
#define | STP_BUF_LEN 8191 |
Maximum size of buffer, not including terminating NULL. | |
Functions | |
void | _stp_sprint (const char *fmt,...) |
Sprint into the scratch buffer. | |
void | _stp_sprint_str (const char *str) |
Write a string into the scratch buffer. | |
char * | _stp_scbuf_clear (void) |
Clear the scratch buffer. |
The scratch buffer is for collecting output before storing in a map, printing, etc. This is a per-cpu static buffer. It is necessary because of the limited stack space available in the kernel.
|
Clear the scratch buffer. This function should be called before anything is written to the scratch buffer. Output will accumulate in the buffer until this function is called again.
Definition at line 74 of file scbuf.c. References STP_BUF_LEN. |
|
Sprint into the scratch buffer. Like printf, except output goes into a global scratch buffer which will contain the null-terminated output. Safe because overflowing the buffer is not allowed. Size is limited by length of scratch buffer, STP_BUF_LEN.
Definition at line 34 of file scbuf.c. References STP_BUF_LEN. Referenced by _stp_symbol_sprint(). |
|
Write a string into the scratch buffer. Copies a string into a global scratch buffer. Safe because overflowing the buffer is not allowed. Size is limited by length of scratch buffer, STP_BUF_LEN. This is more efficient than using _stp_sprint().
Definition at line 56 of file scbuf.c. References STP_BUF_LEN. |