On 17 November 2016 at 17:34, Juri Lelli juri.lelli@arm.com wrote:
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);
you can remove it as well as the open and all reference to trace_fd which is not used anymore AFAICT
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");
you can remove this log
log_ftrace(ft_data.marker_fd, "main ends\n");
log_ftrace(ft_data.trace_fd, "0"); close(ft_data.trace_fd);
ditto
close(ft_data.marker_fd); }
-- 2.10.0