summaryrefslogtreecommitdiffstats
path: root/Documentation/trace/postprocess
diff options
context:
space:
mode:
authorVinayak Menon <vinayakm.list@gmail.com>2014-01-23 18:53:18 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-23 19:36:52 -0500
commitbd7278166aaf8b33da1a3ee437354e2ed88bf70f (patch)
tree3e4b2df3d84d46e28b11ea0d8e3ad41d28b0cace /Documentation/trace/postprocess
parentda8c757b080ee84f219fa2368cb5dd23ac304fc0 (diff)
Documentation/trace/postprocess/trace-vmscan-postprocess.pl: fix the traceevent regex
When irq, preempt and lockdep fields are printed (field 3 in the example below) in the trace output, the script fails. An example entry: kswapd0-610 [000] ...1 158.112152: mm_vmscan_kswapd_wake: nid=0 order=0 Signed-off-by: Vinayak Menon <vinayakm.list@gmail.com> Cc: Mel Gorman <mel@csn.ul.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/trace/postprocess')
-rw-r--r--Documentation/trace/postprocess/trace-vmscan-postprocess.pl18
1 files changed, 9 insertions, 9 deletions
diff --git a/Documentation/trace/postprocess/trace-vmscan-postprocess.pl b/Documentation/trace/postprocess/trace-vmscan-postprocess.pl
index 4a37c4759cd2..00e425faa2fd 100644
--- a/Documentation/trace/postprocess/trace-vmscan-postprocess.pl
+++ b/Documentation/trace/postprocess/trace-vmscan-postprocess.pl
@@ -123,7 +123,7 @@ my $regex_writepage;
123 123
124# Static regex used. Specified like this for readability and for use with /o 124# Static regex used. Specified like this for readability and for use with /o
125# (process_pid) (cpus ) ( time ) (tpoint ) (details) 125# (process_pid) (cpus ) ( time ) (tpoint ) (details)
126my $regex_traceevent = '\s*([a-zA-Z0-9-]*)\s*(\[[0-9]*\])\s*([0-9.]*):\s*([a-zA-Z_]*):\s*(.*)'; 126my $regex_traceevent = '\s*([a-zA-Z0-9-]*)\s*(\[[0-9]*\])(\s*[dX.][Nnp.][Hhs.][0-9a-fA-F.]*|)\s*([0-9.]*):\s*([a-zA-Z_]*):\s*(.*)';
127my $regex_statname = '[-0-9]*\s\((.*)\).*'; 127my $regex_statname = '[-0-9]*\s\((.*)\).*';
128my $regex_statppid = '[-0-9]*\s\(.*\)\s[A-Za-z]\s([0-9]*).*'; 128my $regex_statppid = '[-0-9]*\s\(.*\)\s[A-Za-z]\s([0-9]*).*';
129 129
@@ -270,8 +270,8 @@ EVENT_PROCESS:
270 while ($traceevent = <STDIN>) { 270 while ($traceevent = <STDIN>) {
271 if ($traceevent =~ /$regex_traceevent/o) { 271 if ($traceevent =~ /$regex_traceevent/o) {
272 $process_pid = $1; 272 $process_pid = $1;
273 $timestamp = $3; 273 $timestamp = $4;
274 $tracepoint = $4; 274 $tracepoint = $5;
275 275
276 $process_pid =~ /(.*)-([0-9]*)$/; 276 $process_pid =~ /(.*)-([0-9]*)$/;
277 my $process = $1; 277 my $process = $1;
@@ -299,7 +299,7 @@ EVENT_PROCESS:
299 $perprocesspid{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN}++; 299 $perprocesspid{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN}++;
300 $perprocesspid{$process_pid}->{STATE_DIRECT_BEGIN} = $timestamp; 300 $perprocesspid{$process_pid}->{STATE_DIRECT_BEGIN} = $timestamp;
301 301
302 $details = $5; 302 $details = $6;
303 if ($details !~ /$regex_direct_begin/o) { 303 if ($details !~ /$regex_direct_begin/o) {
304 print "WARNING: Failed to parse mm_vmscan_direct_reclaim_begin as expected\n"; 304 print "WARNING: Failed to parse mm_vmscan_direct_reclaim_begin as expected\n";
305 print " $details\n"; 305 print " $details\n";
@@ -322,7 +322,7 @@ EVENT_PROCESS:
322 $perprocesspid{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[$index] = "$order-$latency"; 322 $perprocesspid{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[$index] = "$order-$latency";
323 } 323 }
324 } elsif ($tracepoint eq "mm_vmscan_kswapd_wake") { 324 } elsif ($tracepoint eq "mm_vmscan_kswapd_wake") {
325 $details = $5; 325 $details = $6;
326 if ($details !~ /$regex_kswapd_wake/o) { 326 if ($details !~ /$regex_kswapd_wake/o) {
327 print "WARNING: Failed to parse mm_vmscan_kswapd_wake as expected\n"; 327 print "WARNING: Failed to parse mm_vmscan_kswapd_wake as expected\n";
328 print " $details\n"; 328 print " $details\n";
@@ -356,7 +356,7 @@ EVENT_PROCESS:
356 } elsif ($tracepoint eq "mm_vmscan_wakeup_kswapd") { 356 } elsif ($tracepoint eq "mm_vmscan_wakeup_kswapd") {
357 $perprocesspid{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD}++; 357 $perprocesspid{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD}++;
358 358
359 $details = $5; 359 $details = $6;
360 if ($details !~ /$regex_wakeup_kswapd/o) { 360 if ($details !~ /$regex_wakeup_kswapd/o) {
361 print "WARNING: Failed to parse mm_vmscan_wakeup_kswapd as expected\n"; 361 print "WARNING: Failed to parse mm_vmscan_wakeup_kswapd as expected\n";
362 print " $details\n"; 362 print " $details\n";
@@ -366,7 +366,7 @@ EVENT_PROCESS:
366 my $order = $3; 366 my $order = $3;
367 $perprocesspid{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD_PERORDER}[$order]++; 367 $perprocesspid{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD_PERORDER}[$order]++;
368 } elsif ($tracepoint eq "mm_vmscan_lru_isolate") { 368 } elsif ($tracepoint eq "mm_vmscan_lru_isolate") {
369 $details = $5; 369 $details = $6;
370 if ($details !~ /$regex_lru_isolate/o) { 370 if ($details !~ /$regex_lru_isolate/o) {
371 print "WARNING: Failed to parse mm_vmscan_lru_isolate as expected\n"; 371 print "WARNING: Failed to parse mm_vmscan_lru_isolate as expected\n";
372 print " $details\n"; 372 print " $details\n";
@@ -387,7 +387,7 @@ EVENT_PROCESS:
387 } 387 }
388 $perprocesspid{$process_pid}->{HIGH_NR_CONTIG_DIRTY} += $nr_contig_dirty; 388 $perprocesspid{$process_pid}->{HIGH_NR_CONTIG_DIRTY} += $nr_contig_dirty;
389 } elsif ($tracepoint eq "mm_vmscan_lru_shrink_inactive") { 389 } elsif ($tracepoint eq "mm_vmscan_lru_shrink_inactive") {
390 $details = $5; 390 $details = $6;
391 if ($details !~ /$regex_lru_shrink_inactive/o) { 391 if ($details !~ /$regex_lru_shrink_inactive/o) {
392 print "WARNING: Failed to parse mm_vmscan_lru_shrink_inactive as expected\n"; 392 print "WARNING: Failed to parse mm_vmscan_lru_shrink_inactive as expected\n";
393 print " $details\n"; 393 print " $details\n";
@@ -397,7 +397,7 @@ EVENT_PROCESS:
397 my $nr_reclaimed = $4; 397 my $nr_reclaimed = $4;
398 $perprocesspid{$process_pid}->{HIGH_NR_RECLAIMED} += $nr_reclaimed; 398 $perprocesspid{$process_pid}->{HIGH_NR_RECLAIMED} += $nr_reclaimed;
399 } elsif ($tracepoint eq "mm_vmscan_writepage") { 399 } elsif ($tracepoint eq "mm_vmscan_writepage") {
400 $details = $5; 400 $details = $6;
401 if ($details !~ /$regex_writepage/o) { 401 if ($details !~ /$regex_writepage/o) {
402 print "WARNING: Failed to parse mm_vmscan_writepage as expected\n"; 402 print "WARNING: Failed to parse mm_vmscan_writepage as expected\n";
403 print " $details\n"; 403 print " $details\n";