[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-2e1f8f7895731a8592d483a7364a23855843af17@git.kernel.org>
Date: Fri, 24 Mar 2017 11:43:08 -0700
From: tip-bot for Ravi Bangoria <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: naveen.n.rao@...ux.vnet.ibm.com, hpa@...or.com, acme@...hat.com,
mpe@...erman.id.au, maddy@...ux.vnet.ibm.com, mhiramat@...nel.org,
alexis.berlemont@...il.com, ravi.bangoria@...ux.vnet.ibm.com,
peterz@...radead.org, tglx@...utronix.de,
linux-kernel@...r.kernel.org, mingo@...nel.org,
alexander.shishkin@...ux.intel.com
Subject: [tip:perf/core] perf probe: Change MAX_CMDLEN
Commit-ID: 2e1f8f7895731a8592d483a7364a23855843af17
Gitweb: http://git.kernel.org/tip/2e1f8f7895731a8592d483a7364a23855843af17
Author: Ravi Bangoria <ravi.bangoria@...ux.vnet.ibm.com>
AuthorDate: Tue, 7 Feb 2017 11:15:47 +0530
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Tue, 21 Mar 2017 10:34:59 -0300
perf probe: Change MAX_CMDLEN
There are many SDT markers in powerpc whose uprobe definition goes
beyond current MAX_CMDLEN, especially when target filename is long and
sdt marker has long list of arguments. For example, definition of sdt
marker
method__compile__end: 8@17 8@9 8@10 -4@8 8@7 -4@6 8@5 -4@4 1@37(28)
from file
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.91-2.b14.fc22.ppc64/jre/lib/ppc64/server/libjvm.so
is
p:sdt_hotspot/method__compile__end /usr/lib/jvm/java-1.8.0-openjdk-\
1.8.0.91-2.b14.fc22.ppc64/jre/lib/ppc64/server/libjvm.so:0x4c4e00\
arg1=%gpr17:u64 arg2=%gpr9:u64 arg3=%gpr10:u64 arg4=%gpr8:s32\
arg5=%gpr7:u64 arg6=%gpr6:s32 arg7=%gpr5:u64 arg8=%gpr4:s32\
arg9=+37(%gpr28):u8
'perf probe' fails with segfault for such markers. As the uprobe_events
file accepts definitions up to 4094 characters(4096 - 2 (\n\0)),
increase value of MAX_CMDLEN match that.
Signed-off-by: Ravi Bangoria <ravi.bangoria@...ux.vnet.ibm.com>
Acked-by: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Alexis Berlemont <alexis.berlemont@...il.com>
Cc: Madhavan Srinivasan <maddy@...ux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@...erman.id.au>
Cc: Naveen N. Rao <naveen.n.rao@...ux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Link: http://lkml.kernel.org/r/20170207054547.3690-1-ravi.bangoria@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/util/probe-event.c | 1 -
tools/perf/util/probe-file.c | 3 ++-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 6740d68..e4b8894 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -47,7 +47,6 @@
#include "probe-file.h"
#include "session.h"
-#define MAX_CMDLEN 256
#define PERFPROBE_GROUP "probe"
bool probe_event_dry_run; /* Dry run flag */
diff --git a/tools/perf/util/probe-file.c b/tools/perf/util/probe-file.c
index 1542cd0..c3c2871 100644
--- a/tools/perf/util/probe-file.c
+++ b/tools/perf/util/probe-file.c
@@ -28,7 +28,8 @@
#include "probe-file.h"
#include "session.h"
-#define MAX_CMDLEN 256
+/* 4096 - 2 ('\n' + '\0') */
+#define MAX_CMDLEN 4094
static void print_open_warning(int err, bool uprobe)
{
Powered by blists - more mailing lists