Skip to content

Commit 7d051e7

Browse files
committed
revert tools/tracing/rtla to v6.6.77 in upstream kernel sources
1 parent 163f8d1 commit 7d051e7

File tree

2 files changed

+174
-0
lines changed

2 files changed

+174
-0
lines changed

upstream_patches/revert_rtla.patch

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
commit 827482c38906e8cf5563a522f87d07048055e3ad
2+
Author: nkraetzschmar <9020053+nkraetzschmar@users.noreply.github.com>
3+
Date: Tue Feb 18 07:36:53 2025 +0100
4+
5+
revert tools/tracing/rtla to v6.6.77
6+
7+
diff --git a/tools/tracing/rtla/src/osnoise.c b/tools/tracing/rtla/src/osnoise.c
8+
index 699a83f538a8..245e9344932b 100644
9+
--- a/tools/tracing/rtla/src/osnoise.c
10+
+++ b/tools/tracing/rtla/src/osnoise.c
11+
@@ -867,7 +867,7 @@ int osnoise_set_workload(struct osnoise_context *context, bool onoff)
12+
13+
retval = osnoise_options_set_option("OSNOISE_WORKLOAD", onoff);
14+
if (retval < 0)
15+
- return -2;
16+
+ return -1;
17+
18+
context->opt_workload = onoff;
19+
20+
diff --git a/tools/tracing/rtla/src/timerlat_hist.c b/tools/tracing/rtla/src/timerlat_hist.c
21+
index 1525e88c6cf9..667f12f2d67f 100644
22+
--- a/tools/tracing/rtla/src/timerlat_hist.c
23+
+++ b/tools/tracing/rtla/src/timerlat_hist.c
24+
@@ -900,15 +900,12 @@ timerlat_hist_apply_config(struct osnoise_tool *tool, struct timerlat_hist_param
25+
auto_house_keeping(&params->monitored_cpus);
26+
}
27+
28+
- /*
29+
- * Set workload according to type of thread if the kernel supports it.
30+
- * On kernels without support, user threads will have already failed
31+
- * on missing timerlat_fd, and kernel threads do not need it.
32+
- */
33+
- retval = osnoise_set_workload(tool->context, params->kernel_workload);
34+
- if (retval < -1) {
35+
- err_msg("Failed to set OSNOISE_WORKLOAD option\n");
36+
- goto out_err;
37+
+ if (params->user_hist) {
38+
+ retval = osnoise_set_workload(tool->context, 0);
39+
+ if (retval) {
40+
+ err_msg("Failed to set OSNOISE_WORKLOAD option\n");
41+
+ goto out_err;
42+
+ }
43+
}
44+
45+
return 0;
46+
@@ -949,12 +946,9 @@ static struct osnoise_tool
47+
}
48+
49+
static int stop_tracing;
50+
-static struct trace_instance *hist_inst = NULL;
51+
static void stop_hist(int sig)
52+
{
53+
stop_tracing = 1;
54+
- if (hist_inst)
55+
- trace_instance_stop(hist_inst);
56+
}
57+
58+
/*
59+
@@ -1000,12 +994,6 @@ int timerlat_hist_main(int argc, char *argv[])
60+
}
61+
62+
trace = &tool->trace;
63+
- /*
64+
- * Save trace instance into global variable so that SIGINT can stop
65+
- * the timerlat tracer.
66+
- * Otherwise, rtla could loop indefinitely when overloaded.
67+
- */
68+
- hist_inst = trace;
69+
70+
retval = enable_timerlat(trace);
71+
if (retval) {
72+
@@ -1138,7 +1126,7 @@ int timerlat_hist_main(int argc, char *argv[])
73+
74+
return_value = 0;
75+
76+
- if (trace_is_off(&tool->trace, &record->trace) && !stop_tracing) {
77+
+ if (trace_is_off(&tool->trace, &record->trace)) {
78+
printf("rtla timerlat hit stop tracing\n");
79+
80+
if (!params->no_aa)
81+
diff --git a/tools/tracing/rtla/src/timerlat_top.c b/tools/tracing/rtla/src/timerlat_top.c
82+
index 5a33789a375e..0915092057f8 100644
83+
--- a/tools/tracing/rtla/src/timerlat_top.c
84+
+++ b/tools/tracing/rtla/src/timerlat_top.c
85+
@@ -679,15 +679,12 @@ timerlat_top_apply_config(struct osnoise_tool *top, struct timerlat_top_params *
86+
auto_house_keeping(&params->monitored_cpus);
87+
}
88+
89+
- /*
90+
- * Set workload according to type of thread if the kernel supports it.
91+
- * On kernels without support, user threads will have already failed
92+
- * on missing timerlat_fd, and kernel threads do not need it.
93+
- */
94+
- retval = osnoise_set_workload(top->context, params->kernel_workload);
95+
- if (retval < -1) {
96+
- err_msg("Failed to set OSNOISE_WORKLOAD option\n");
97+
- goto out_err;
98+
+ if (params->user_top) {
99+
+ retval = osnoise_set_workload(top->context, 0);
100+
+ if (retval) {
101+
+ err_msg("Failed to set OSNOISE_WORKLOAD option\n");
102+
+ goto out_err;
103+
+ }
104+
}
105+
106+
return 0;
107+
@@ -728,12 +725,9 @@ static struct osnoise_tool
108+
}
109+
110+
static int stop_tracing;
111+
-static struct trace_instance *top_inst = NULL;
112+
static void stop_top(int sig)
113+
{
114+
stop_tracing = 1;
115+
- if (top_inst)
116+
- trace_instance_stop(top_inst);
117+
}
118+
119+
/*
120+
@@ -780,13 +774,6 @@ int timerlat_top_main(int argc, char *argv[])
121+
}
122+
123+
trace = &top->trace;
124+
- /*
125+
- * Save trace instance into global variable so that SIGINT can stop
126+
- * the timerlat tracer.
127+
- * Otherwise, rtla could loop indefinitely when overloaded.
128+
- */
129+
- top_inst = trace;
130+
-
131+
132+
retval = enable_timerlat(trace);
133+
if (retval) {
134+
@@ -935,7 +922,7 @@ int timerlat_top_main(int argc, char *argv[])
135+
136+
return_value = 0;
137+
138+
- if (trace_is_off(&top->trace, &record->trace) && !stop_tracing) {
139+
+ if (trace_is_off(&top->trace, &record->trace)) {
140+
printf("rtla timerlat hit stop tracing\n");
141+
142+
if (!params->no_aa)
143+
diff --git a/tools/tracing/rtla/src/trace.c b/tools/tracing/rtla/src/trace.c
144+
index 93e4032b2397..e1ba6d9f4265 100644
145+
--- a/tools/tracing/rtla/src/trace.c
146+
+++ b/tools/tracing/rtla/src/trace.c
147+
@@ -196,14 +196,6 @@ int trace_instance_start(struct trace_instance *trace)
148+
return tracefs_trace_on(trace->inst);
149+
}
150+
151+
-/*
152+
- * trace_instance_stop - stop tracing a given rtla instance
153+
- */
154+
-int trace_instance_stop(struct trace_instance *trace)
155+
-{
156+
- return tracefs_trace_off(trace->inst);
157+
-}
158+
-
159+
/*
160+
* trace_events_free - free a list of trace events
161+
*/
162+
diff --git a/tools/tracing/rtla/src/trace.h b/tools/tracing/rtla/src/trace.h
163+
index 551a7cb81f63..2e9a89a25615 100644
164+
--- a/tools/tracing/rtla/src/trace.h
165+
+++ b/tools/tracing/rtla/src/trace.h
166+
@@ -21,7 +21,6 @@ struct trace_instance {
167+
168+
int trace_instance_init(struct trace_instance *trace, char *tool_name);
169+
int trace_instance_start(struct trace_instance *trace);
170+
-int trace_instance_stop(struct trace_instance *trace);
171+
void trace_instance_destroy(struct trace_instance *trace);
172+
173+
struct trace_seq *get_trace_seq(void);

upstream_patches/series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,4 @@ fpga-ofs-dev-6.6-lts-patches/0086-.github-workflows-build-kernel-packages.patch
8787
fpga-ofs-dev-6.6-lts-patches/0087-.github-workflows-scan-kernel-with-Coverity.patch
8888
fpga-ofs-dev-6.6-lts-patches/0088-fpga-dfl-cxl-cache-depend-on-DRM.patch
8989
intel-dfl-fixes/001-fix-config-dependency-intel-s10hssi.patch
90+
revert_rtla.patch

0 commit comments

Comments
 (0)