Similar to bd7278166aaf8b33da1a3ee437354e2ed88bf70f ("Documentation/ trace/postprocess/trace-vmscan-postprocess.pl: fix the traceevent regex"), but applied to the trace-pagealoc-postprocess.pl script.
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: Ralph Siemsen ralph.siemsen@linaro.org Cc: stable@vger.kernel.org Change-Id: I07e0d6f52ae7bf1de5c4054fb2ad0cef85d18513 --- .../trace/postprocess/trace-pagealloc-postprocess.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Documentation/trace/postprocess/trace-pagealloc-postprocess.pl b/Documentation/trace/postprocess/trace-pagealloc-postprocess.pl index 0a120aae33ce..94efc7fb272e 100644 --- a/Documentation/trace/postprocess/trace-pagealloc-postprocess.pl +++ b/Documentation/trace/postprocess/trace-pagealloc-postprocess.pl @@ -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);
linux-stable-mirror@lists.linaro.org