@@ -87,7 +87,7 @@ int main(int argc, char **argv)
bpf_map_update_elem(pidmap_fd, &key, &pid, 0);
snprintf(buf, sizeof(buf),
- "/sys/kernel/debug/tracing/events/%s/id", probe_name);
+ "/sys/kernel/tracing/events/%s/id", probe_name);
efd = open(buf, O_RDONLY, 0);
if (CHECK(efd < 0, "open", "err %d errno %d\n", efd, errno))
goto close_prog;
@@ -338,7 +338,7 @@ static int get_syms(char ***symsp, size_t *cntp)
* Filtering out duplicates by using hashmap__add, which won't
* add existing entry.
*/
- f = fopen("/sys/kernel/debug/tracing/available_filter_functions", "r");
+ f = fopen("/sys/kernel/tracing/available_filter_functions", "r");
if (!f)
return -EINVAL;
@@ -18,7 +18,7 @@ static void test_task_fd_query_tp_core(const char *probe_name,
goto close_prog;
snprintf(buf, sizeof(buf),
- "/sys/kernel/debug/tracing/events/%s/id", probe_name);
+ "/sys/kernel/tracing/events/%s/id", probe_name);
efd = open(buf, O_RDONLY, 0);
if (CHECK(efd < 0, "open", "err %d errno %d\n", efd, errno))
goto close_prog;
@@ -17,7 +17,7 @@ void serial_test_tp_attach_query(void)
obj[i] = NULL;
snprintf(buf, sizeof(buf),
- "/sys/kernel/debug/tracing/events/sched/sched_switch/id");
+ "/sys/kernel/tracing/events/sched/sched_switch/id");
efd = open(buf, O_RDONLY, 0);
if (CHECK(efd < 0, "open", "err %d errno %d\n", efd, errno))
return;
@@ -5,7 +5,7 @@
#include "trace_printk.lskel.h"
-#define TRACEBUF "/sys/kernel/debug/tracing/trace_pipe"
+#define TRACEBUF "/sys/kernel/tracing/trace_pipe"
#define SEARCHMSG "testing,testing"
void serial_test_trace_printk(void)
@@ -5,7 +5,7 @@
#include "trace_vprintk.lskel.h"
-#define TRACEBUF "/sys/kernel/debug/tracing/trace_pipe"
+#define TRACEBUF "/sys/kernel/tracing/trace_pipe"
#define SEARCHMSG "1,2,3,4,5,6,7,8,9,10"
void serial_test_trace_vprintk(void)
@@ -38,7 +38,7 @@ struct {
__type(value, stack_trace_t);
} stack_amap SEC(".maps");
-/* taken from /sys/kernel/debug/tracing/events/sched/sched_switch/format */
+/* taken from /sys/kernel/tracing/events/sched/sched_switch/format */
struct sched_switch_args {
unsigned long long pad;
char prev_comm[TASK_COMM_LEN];
@@ -4,7 +4,7 @@
#include <vmlinux.h>
#include <bpf/bpf_helpers.h>
-/* taken from /sys/kernel/debug/tracing/events/sched/sched_switch/format */
+/* taken from /sys/kernel/tracing/events/sched/sched_switch/format */
struct sched_switch_args {
unsigned long long pad;
char prev_comm[TASK_COMM_LEN];
@@ -1,6 +1,6 @@
#!/bin/bash
-TR=/sys/kernel/debug/tracing/
+TR=/sys/kernel/tracing/
clear_trace() { # reset trace output
echo > $TR/trace
}
@@ -542,7 +542,7 @@ setup_xfrm_tunnel()
test_xfrm_tunnel()
{
config_device
- > /sys/kernel/debug/tracing/trace
+ > /sys/kernel/tracing/trace
setup_xfrm_tunnel
mkdir -p ${BPF_PIN_TUNNEL_DIR}
bpftool prog loadall ./test_tunnel_kern.o ${BPF_PIN_TUNNEL_DIR}
@@ -551,11 +551,11 @@ test_xfrm_tunnel()
${BPF_PIN_TUNNEL_DIR}/xfrm_get_state
ip netns exec at_ns0 ping $PING_ARG 10.1.1.200
sleep 1
- grep "reqid 1" /sys/kernel/debug/tracing/trace
+ grep "reqid 1" /sys/kernel/tracing/trace
check_err $?
- grep "spi 0x1" /sys/kernel/debug/tracing/trace
+ grep "spi 0x1" /sys/kernel/tracing/trace
check_err $?
- grep "remote ip 0xac100164" /sys/kernel/debug/tracing/trace
+ grep "remote ip 0xac100164" /sys/kernel/tracing/trace
check_err $?
cleanup
@@ -12,7 +12,7 @@
#include <sys/mman.h>
#include "trace_helpers.h"
-#define DEBUGFS "/sys/kernel/debug/tracing/"
+#define TRACEFS "/sys/kernel/tracing/"
#define MAX_SYMS 300000
static struct ksym syms[MAX_SYMS];
@@ -130,7 +130,7 @@ void read_trace_pipe(void)
{
int trace_fd;
- trace_fd = open(DEBUGFS "trace_pipe", O_RDONLY, 0);
+ trace_fd = open(TRACEFS "trace_pipe", O_RDONLY, 0);
if (trace_fd < 0)
return;
The canonical location for the tracefs filesystem is at /sys/kernel/tracing. But, from Documentation/trace/ftrace.rst: Before 4.1, all ftrace tracing control files were within the debugfs file system, which is typically located at /sys/kernel/debug/tracing. For backward compatibility, when mounting the debugfs file system, the tracefs file system will be automatically mounted at: /sys/kernel/debug/tracing Many tests in the bpf selftest code still refer to this older debugfs path, so let's update them to avoid confusion. Signed-off-by: Ross Zwisler <zwisler@google.com> --- tools/testing/selftests/bpf/get_cgroup_id_user.c | 2 +- .../testing/selftests/bpf/prog_tests/kprobe_multi_test.c | 2 +- tools/testing/selftests/bpf/prog_tests/task_fd_query_tp.c | 2 +- tools/testing/selftests/bpf/prog_tests/tp_attach_query.c | 2 +- tools/testing/selftests/bpf/prog_tests/trace_printk.c | 2 +- tools/testing/selftests/bpf/prog_tests/trace_vprintk.c | 2 +- tools/testing/selftests/bpf/progs/test_stacktrace_map.c | 2 +- tools/testing/selftests/bpf/progs/test_tracepoint.c | 2 +- tools/testing/selftests/bpf/test_ftrace.sh | 2 +- tools/testing/selftests/bpf/test_tunnel.sh | 8 ++++---- tools/testing/selftests/bpf/trace_helpers.c | 4 ++-- 11 files changed, 15 insertions(+), 15 deletions(-)