Lines Matching refs:buffer
24 if (WARN_ONCE((s)->buffer == TRACE_SEQ_POISON, \
48 s->buffer = malloc(s->buffer_size);
49 if (s->buffer != NULL)
70 * @s: a pointer to the trace_seq to free the buffer
72 * Only frees the buffer, not the trace_seq struct itself.
79 free(s->buffer);
80 s->buffer = TRACE_SEQ_POISON;
87 buf = realloc(s->buffer, s->buffer_size + TRACE_SEQ_BUF_SIZE);
88 if (WARN_ONCE(!buf, "Can't allocate trace_seq buffer memory")) {
93 s->buffer = buf;
102 * It returns 0 if the trace oversizes the buffer's free
109 * buffer (@s). Then the output may be either used by
110 * the sequencer or pulled into another buffer.
125 ret = vsnprintf(s->buffer + s->len, len, fmt, ap);
144 * It returns 0 if the trace oversizes the buffer's free
151 * buffer (@s). Then the output may be either used by
152 * the sequencer or pulled into another buffer.
165 ret = vsnprintf(s->buffer + s->len, len, fmt, args);
185 * into a special buffer (@s) for later retrieval by a sequencer
201 memcpy(s->buffer + s->len, str, len);
216 s->buffer[s->len++] = c;
225 /* There's always one character left on the buffer */
226 s->buffer[s->len] = 0;
235 return fprintf(fp, "%.*s", s->len, s->buffer);
240 fprintf(fp, "%s\n", "Can't allocate trace_seq buffer memory");