aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-02-04 19:16:59 -0500
committerSteven Rostedt <rostedt@goodmis.org>2010-02-04 19:16:59 -0500
commitfb33c621b0c7066129486f5b7c40b70703d88a43 (patch)
tree3dfaa6af183003e6885b19d7a087e64af8b0a7dc
parentf3c393decc3e0bb6c9e5dffe8f39ba290877912b (diff)
trace-cmd: Fix trace-cmd split commit page sizes
The commit value in the begining of the page does not include the header. Subtract 16 from 64bit files, and 12 from 32bit. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--trace-split.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/trace-split.c b/trace-split.c
index 9c30b52..1e25da2 100644
--- a/trace-split.c
+++ b/trace-split.c
@@ -159,10 +159,10 @@ static void write_page(struct cpu_data *cpu_data, int long_size)
159{ 159{
160 if (long_size == 8) 160 if (long_size == 8)
161 *(unsigned long long *)cpu_data->commit = 161 *(unsigned long long *)cpu_data->commit =
162 (unsigned long long)cpu_data->index; 162 (unsigned long long)cpu_data->index - 16;
163 else 163 else
164 *(unsigned int *)cpu_data->commit = 164 *(unsigned int *)cpu_data->commit =
165 cpu_data->index; 165 cpu_data->index - 12;
166 write(cpu_data->fd, cpu_data->page, page_size); 166 write(cpu_data->fd, cpu_data->page, page_size);
167} 167}
168 168