* [PATCH] Documentation/trace/postprocess/trace-pagealloc-postprocess.pl: fix the traceevent regex
@ 2020-09-29 12:57 Ralph Siemsen
0 siblings, 0 replies; 2+ messages in thread
From: Ralph Siemsen @ 2020-09-29 12:57 UTC (permalink / raw)
To: trivial, mel; +Cc: vinayakm.list, Ralph Siemsen, stable
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);
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] Documentation/trace/postprocess/trace-pagealloc-postprocess.pl: fix the traceevent regex
@ 2014-03-01 5:43 vinayakm.list
0 siblings, 0 replies; 2+ messages in thread
From: vinayakm.list @ 2014-03-01 5:43 UTC (permalink / raw)
To: rob, linux-doc; +Cc: linux-kernel, Vinayak Menon
From: Vinayak Menon <vinayakm.list@gmail.com>
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 <vinayakm.list@gmail.com>
---
.../postprocess/trace-pagealloc-postprocess.pl | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Documentation/trace/postprocess/trace-pagealloc-postprocess.pl b/Documentation/trace/postprocess/trace-pagealloc-postprocess.pl
index 0a120aa..94efc7f 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);
--
1.7.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-29 12:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29 12:57 [PATCH] Documentation/trace/postprocess/trace-pagealloc-postprocess.pl: fix the traceevent regex Ralph Siemsen
-- strict thread matches above, loose matches on Subject: below --
2014-03-01 5:43 vinayakm.list
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.