aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-05-17 21:19:03 -0400
committerSteven Rostedt <rostedt@goodmis.org>2010-05-17 21:19:03 -0400
commit21ed16c667b5cb29daf2c84eb978a9bde01632ca (patch)
tree149e2b30695bee4459db6b79d01e15ff7992f07c
parentb9a540b8a13b52fae2c245a7eb14be037c2cf9ed (diff)
trace-cmd/split: Force percpu when parsing by pages is set
When parsing by pages is set, we automatically set the percpu parsing. This is because non percpu does not make sense. The CPU data is stored per page and two or more CPU data is not shared on a single CPU data page. This patch forces the -c option (percpu) when the -p option is set. Previously the -p option without the -c option gave some strange results. Usually just one or two events per page. Reported-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--Documentation/trace-cmd-split.1.txt2
-rw-r--r--trace-split.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/Documentation/trace-cmd-split.1.txt b/Documentation/trace-cmd-split.1.txt
index d061f39..1c16805 100644
--- a/Documentation/trace-cmd-split.1.txt
+++ b/Documentation/trace-cmd-split.1.txt
@@ -60,6 +60,8 @@ OPTIONS
60 60
61 Note: only one of *-p*, *-e*, *-u*, *-m*, *-s* may be specified at a time. 61 Note: only one of *-p*, *-e*, *-u*, *-m*, *-s* may be specified at a time.
62 62
63 If *-p* is specified, then *-c* is automatically set.
64
63*-r*:: 65*-r*::
64 This option causes the break up to repeat until end-time is reached (or 66 This option causes the break up to repeat until end-time is reached (or
65 end of the input if end-time is not specified). 67 end of the input if end-time is not specified).
diff --git a/trace-split.c b/trace-split.c
index 9e74554..a75554e 100644
--- a/trace-split.c
+++ b/trace-split.c
@@ -441,6 +441,10 @@ void trace_split (int argc, char **argv)
441 if (count <= 0) 441 if (count <= 0)
442 die("Units must be greater than 0"); 442 die("Units must be greater than 0");
443 split_type = type; 443 split_type = type;
444
445 /* Spliting by pages only makes sense per cpu */
446 if (type == SPLIT_PAGES)
447 percpu = 1;
444 break; 448 break;
445 case 'r': 449 case 'r':
446 repeat = 1; 450 repeat = 1;