Don't explicitly manage start/stop of tracing, but assume that the caller does that before starting rt-app. This helps if the caller wants more padding before/after an rt-app execution.
In case tracing is not started and ftrace is enable in the json configuration, rt-app will fail to start.
Signed-off-by: Juri Lelli juri.lelli@arm.com --- src/rt-app.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/rt-app.c b/src/rt-app.c index 2354d423bcd2..2c6df5251ebe 100644 --- a/src/rt-app.c +++ b/src/rt-app.c @@ -430,9 +430,8 @@ shutdown(int sig) }
if (opts.ftrace) { - log_notice("stopping ftrace"); log_ftrace(ft_data.marker_fd, "main ends\n"); - log_ftrace(ft_data.trace_fd, "0"); + log_notice("deconfiguring ftrace"); close(ft_data.trace_fd); close(ft_data.marker_fd); } @@ -745,7 +744,6 @@ int main(int argc, char* argv[]) exit(EXIT_FAILURE); }
- log_ftrace(ft_data.trace_fd, "1"); log_ftrace(ft_data.marker_fd, "main creates threads\n"); }
@@ -937,7 +935,6 @@ int main(int argc, char* argv[]) if (opts.ftrace) { log_notice("stopping ftrace"); log_ftrace(ft_data.marker_fd, "main ends\n"); - log_ftrace(ft_data.trace_fd, "0"); close(ft_data.trace_fd); close(ft_data.marker_fd); }