Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1572282 > unrolled thread
| Started by | Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> |
|---|---|
| First post | 2017-02-02 12:20 +0100 |
| Last post | 2017-02-07 06:50 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 5/5] perf/probe: Change MAX_CMDLEN Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2017-02-02 12:20 +0100
Re: [PATCH 5/5] perf/probe: Change MAX_CMDLEN Masami Hiramatsu <mhiramat@kernel.org> - 2017-02-07 02:50 +0100
[PATCH v2] perf/probe: Change MAX_CMDLEN Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2017-02-07 06:50 +0100
| From | Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-02-02 12:20 +0100 |
| Subject | [PATCH 5/5] perf/probe: Change MAX_CMDLEN |
| Message-ID | <t6nAJ-3eT-9@gated-at.bofh.it> |
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 seg fault for such markers. As uprobe_events file
accepts definition beyond 256 characters, increase value of MAX_CMDLEN
to 512.
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
---
tools/perf/util/probe-event.c | 1 -
tools/perf/util/probe-file.c | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 2c1bca2..5f3256f 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 38eca3c..1580e26 100644
--- a/tools/perf/util/probe-file.c
+++ b/tools/perf/util/probe-file.c
@@ -29,7 +29,7 @@
#include "session.h"
#include "perf_regs.h"
-#define MAX_CMDLEN 256
+#define MAX_CMDLEN 512
static void print_open_warning(int err, bool uprobe)
{
--
2.9.3
[toc] | [next] | [standalone]
| From | Masami Hiramatsu <mhiramat@kernel.org> |
|---|---|
| Date | 2017-02-07 02:50 +0100 |
| Message-ID | <t834S-4uf-13@gated-at.bofh.it> |
| In reply to | #1572282 |
On Thu, 2 Feb 2017 16:41:43 +0530
Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> wrote:
> 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 seg fault for such markers. As uprobe_events file
> accepts definition beyond 256 characters, increase value of MAX_CMDLEN
> to 512.
OK, actually in the kernel side, it accepts up to 4094 (+"\n\0")
so it is a good time to expand it to 4094.
(I found another buggy message in kernel... will be fixed soon)
Thank you,
> Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
> ---
> tools/perf/util/probe-event.c | 1 -
> tools/perf/util/probe-file.c | 2 +-
> 2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
> index 2c1bca2..5f3256f 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 38eca3c..1580e26 100644
> --- a/tools/perf/util/probe-file.c
> +++ b/tools/perf/util/probe-file.c
> @@ -29,7 +29,7 @@
> #include "session.h"
> #include "perf_regs.h"
>
> -#define MAX_CMDLEN 256
> +#define MAX_CMDLEN 512
>
> static void print_open_warning(int err, bool uprobe)
> {
> --
> 2.9.3
>
--
Masami Hiramatsu <mhiramat@kernel.org>
[toc] | [prev] | [next] | [standalone]
| From | Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-02-07 06:50 +0100 |
| Subject | [PATCH v2] perf/probe: Change MAX_CMDLEN |
| Message-ID | <t86P7-71B-5@gated-at.bofh.it> |
| In reply to | #1575320 |
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 seg fault for such markers. As uprobe_events file
accepts definition upto 4094 characters(4096 - 2 (\n\0)), increase value
of MAX_CMDLEN to 4094.
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
---
Changes in v2:
- Set MAX_CMDLEN to 4094 instead of 512
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 6a6f44d..e6e3244 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 38eca3c..fdabe7e 100644
--- a/tools/perf/util/probe-file.c
+++ b/tools/perf/util/probe-file.c
@@ -29,7 +29,8 @@
#include "session.h"
#include "perf_regs.h"
-#define MAX_CMDLEN 256
+/* 4096 - 2 ('\n' + '\0') */
+#define MAX_CMDLEN 4094
static void print_open_warning(int err, bool uprobe)
{
--
2.9.3
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web