Re: [PATCH -mm 3/5] samples/bpf/tracex2: replace hard-coded 16 with TASK_COMM_LEN

From
Alexei Starovoitov <hidden>
Date
2021-12-04 16:45:59
Also in
bpf, linux-mm, linux-perf-users, lkml
Reply to
Yafang Shao, 2021-12-04
On Sat, Dec 4, 2021 at 1:53 AM Yafang Shao [off-list ref] wrote:
quoted hunk ↗ jump to hunk
diff --git a/samples/bpf/tracex2_user.c b/samples/bpf/tracex2_user.c
index 1626d51dfffd..b728a946d83d 100644
--- a/samples/bpf/tracex2_user.c
+++ b/samples/bpf/tracex2_user.c
@@ -12,6 +12,7 @@

 #define MAX_INDEX      64
 #define MAX_STARS      38
+#define TASK_COMM_LEN  16

 /* my_map, my_hist_map */
 static int map_fd[2];
@@ -28,7 +29,7 @@ static void stars(char *str, long val, long max, int width)
 }

 struct task {
-       char comm[16];
+       char comm[TASK_COMM_LEN];
Also Nack.
Thread (15 messages) 15 messages, 3 authors, last reply 2021-12-09
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help