Message ID | 20190401234327.26819-9-jniethe5@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | Improvements to trace buffers | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch master (050d8165ab05b6d9cdf4bfee42d9776969c77029) |
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot | success | Test snowpatch/job/snowpatch-skiboot on branch master |
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco | fail | Signed-off-by missing |
diff --git a/include/trace.h b/include/trace.h index 2b65e9075591..665817ab3c67 100644 --- a/include/trace.h +++ b/include/trace.h @@ -21,7 +21,6 @@ #include <lock.h> #include <trace_types.h> -#define TBUF_SZ (1024 * 1024) struct cpu_thread; @@ -35,6 +34,8 @@ struct trace_info { struct tracebuf tb; }; +#define TBUF_SZ ((1024 * 1024) - sizeof(struct trace_info) - sizeof(union trace)) + /* Allocate trace buffers once we know memory topology */ void init_trace_buffers(void);
We want to be able to mmap the trace buffers to be used by the dump_trace tool. As mmaping is done in terms of pages it makes sense that the size of the trace buffers should be page aligned. This is slightly complicated by the space taken up by the header at the beginning of the trace and the room left for an extra trace entry at the end of the buffer. Change the size of the buffer itself so that the entire trace buffer size will be page aligned. --- v2: Don't significantly change the size of the buffer. Signed-off-by: Jordan Niethe <jniethe5@gmail.com> --- include/trace.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)