forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/tools/perf/trace/beauty/kcmp.c
....@@ -1,9 +1,8 @@
1
+// SPDX-License-Identifier: LGPL-2.1
12 /*
23 * trace/beauty/kcmp.c
34 *
45 * Copyright (C) 2017, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com>
5
- *
6
- * Released under the GPL v2. (and only v2, not any later version)
76 */
87
98 #include "trace/beauty/beauty.h"
....@@ -27,10 +26,10 @@
2726 return pid__scnprintf_fd(arg->trace, pid, fd, bf, size);
2827 }
2928
30
-static size_t kcmp__scnprintf_type(int type, char *bf, size_t size)
29
+static size_t kcmp__scnprintf_type(int type, char *bf, size_t size, bool show_prefix)
3130 {
32
- static DEFINE_STRARRAY(kcmp_types);
33
- return strarray__scnprintf(&strarray__kcmp_types, bf, size, "%d", type);
31
+ static DEFINE_STRARRAY(kcmp_types, "KCMP_");
32
+ return strarray__scnprintf(&strarray__kcmp_types, bf, size, "%d", show_prefix, type);
3433 }
3534
3635 size_t syscall_arg__scnprintf_kcmp_type(char *bf, size_t size, struct syscall_arg *arg)
....@@ -40,5 +39,5 @@
4039 if (type != KCMP_FILE)
4140 arg->mask |= (1 << 3) | (1 << 4); /* Ignore idx1 and idx2 */
4241
43
- return kcmp__scnprintf_type(type, bf, size);
42
+ return kcmp__scnprintf_type(type, bf, size, arg->show_string_prefix);
4443 }