Documentation/trace/postprocess/trace-pagealloc-postprocess.pl: fix the traceevent regex
PATCH 1/1 Documentation/trace/postprocess/trace-pagealloc-postprocess.pl: fix the traceevent regex
From: Vinayak Menon <[email protected]>
The script fails, when irq, preempt and lockdep fields (field 3 below) are printed in the trace output.
Example entry:
worker/0:0-4 [000] ...1 1155.972338: mm_page_alloc:
Signed-off-by Vinayak Menon <[email protected]>
--- .../postprocess/trace-pagealloc-postprocess.pl | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
Documentation/trace/postprocess/trace-pagealloc-postprocess.pl +4 -4
@@ -84,7 +84,7 @@ my $regex_fragdetails; # Static regex used. Specified like this for readability and for use with /o # (process_pid) (cpus ) ( time ) (tpoint ) (details) -my $regex_traceevent = '\s*([a-zA-Z0-9-]*)\s*(\[[0-9]*\])\s*([0-9.]*):\s*([a-zA-Z_]*):\s*(.*)'; +my $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*(.*)'; my $regex_statname = '[-0-9]*\s\((.*)\).*'; my $regex_statppid = '[-0-9]*\s\(.*\)\s[A-Za-z]\s([0-9]*).*';
@@ -195,7 +195,7 @@ EVENT_PROCESS: while ($traceevent = <STDIN>) { if ($traceevent =~ /$regex_traceevent/o) { $process_pid = $1; - $tracepoint = $4; + $tracepoint = $5; if ($opt_read_procstat || $opt_prepend_parent) { $process_pid =~ /(.*)-([0-9]*)$/;
@@ -215,7 +215,7 @@ EVENT_PROCESS: # Unnecessary in this script. Uncomment if required # $cpus = $2; - # $timestamp = $3; + # $timestamp = $4; } else { next; }
@@ -236,7 +236,7 @@ EVENT_PROCESS: } elsif ($tracepoint eq "mm_page_alloc_extfrag") { # Extract the details of the event now - $details = $5; + $details = $6; my ($page, $pfn); my ($alloc_order, $fallback_order, $pageblock_order);
Signature · 1 line
1.7.6