diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-04-07 07:47:33 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-04-07 07:47:45 -0400 |
| commit | 93776a8ec746cf9d32c36e5a5b23d28d8be28826 (patch) | |
| tree | 6c472ae9f709246ee5268e1d71559d07839fb965 /kernel/trace/trace_output.c | |
| parent | 34886c8bc590f078d4c0b88f50d061326639198d (diff) | |
| parent | d508afb437daee7cf07da085b635c44a4ebf9b38 (diff) | |
Merge branch 'linus' into tracing/core
Merge reason: update to upstream tracing facilities
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace_output.c')
| -rw-r--r-- | kernel/trace/trace_output.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index a3b6e3fd7044..aeac358ee231 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c | |||
| @@ -147,7 +147,7 @@ int trace_seq_putc(struct trace_seq *s, unsigned char c) | |||
| 147 | return 1; | 147 | return 1; |
| 148 | } | 148 | } |
| 149 | 149 | ||
| 150 | int trace_seq_putmem(struct trace_seq *s, void *mem, size_t len) | 150 | int trace_seq_putmem(struct trace_seq *s, const void *mem, size_t len) |
| 151 | { | 151 | { |
| 152 | if (len > ((PAGE_SIZE - 1) - s->len)) | 152 | if (len > ((PAGE_SIZE - 1) - s->len)) |
| 153 | return 0; | 153 | return 0; |
| @@ -158,10 +158,10 @@ int trace_seq_putmem(struct trace_seq *s, void *mem, size_t len) | |||
| 158 | return len; | 158 | return len; |
| 159 | } | 159 | } |
| 160 | 160 | ||
| 161 | int trace_seq_putmem_hex(struct trace_seq *s, void *mem, size_t len) | 161 | int trace_seq_putmem_hex(struct trace_seq *s, const void *mem, size_t len) |
| 162 | { | 162 | { |
| 163 | unsigned char hex[HEX_CHARS]; | 163 | unsigned char hex[HEX_CHARS]; |
| 164 | unsigned char *data = mem; | 164 | const unsigned char *data = mem; |
| 165 | int i, j; | 165 | int i, j; |
| 166 | 166 | ||
| 167 | #ifdef __BIG_ENDIAN | 167 | #ifdef __BIG_ENDIAN |
| @@ -177,6 +177,19 @@ int trace_seq_putmem_hex(struct trace_seq *s, void *mem, size_t len) | |||
| 177 | return trace_seq_putmem(s, hex, j); | 177 | return trace_seq_putmem(s, hex, j); |
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | void *trace_seq_reserve(struct trace_seq *s, size_t len) | ||
| 181 | { | ||
| 182 | void *ret; | ||
| 183 | |||
| 184 | if (len > ((PAGE_SIZE - 1) - s->len)) | ||
| 185 | return NULL; | ||
| 186 | |||
| 187 | ret = s->buffer + s->len; | ||
| 188 | s->len += len; | ||
| 189 | |||
| 190 | return ret; | ||
| 191 | } | ||
| 192 | |||
| 180 | int trace_seq_path(struct trace_seq *s, struct path *path) | 193 | int trace_seq_path(struct trace_seq *s, struct path *path) |
| 181 | { | 194 | { |
| 182 | unsigned char *p; | 195 | unsigned char *p; |
