diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2016-03-17 14:30:14 -0400 |
---|---|---|
committer | John Kacur <jkacur@redhat.com> | 2016-03-22 15:37:00 +0100 |
commit | 42596a70b461a6df56e9f25ad4a4329e6fb13fdb (patch) | |
tree | 70313699a15df2c11128c35662de02068c8be7ed | |
parent | c20e8c2c553ac5d86911d41afea37c842606ddd7 (diff) | |
download | rt-tests-42596a70b461a6df56e9f25ad4a4329e6fb13fdb.tar.gz rt-tests-42596a70b461a6df56e9f25ad4a4329e6fb13fdb.tar.xz |
cyclictest: tracing(): check for notrace
If you pass -b and --notrace to cyclictest today, it will
write to tracing_on when -b latency is reached.
Fix this by making tracing() check notrace.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
-rw-r--r-- | src/cyclictest/cyclictest.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c index 5834f4e..fe79345 100644 --- a/src/cyclictest/cyclictest.c +++ b/src/cyclictest/cyclictest.c @@ -495,6 +495,9 @@ static void tracemark(char *fmt, ...) static void tracing(int on) { + if (notrace) + return; + if (on) { switch (kernelversion) { case KV_26_LT18: gettimeofday(0,(struct timezone *)1); break; @@ -1888,7 +1891,7 @@ static void sighand(int sig) shutdown = 1; if (refresh_on_max) pthread_cond_signal(&refresh_on_max_cond); - if (tracelimit && !notrace) + if (tracelimit) tracing(0); } @@ -2518,7 +2521,7 @@ int main(int argc, char **argv) } out: /* ensure that the tracer is stopped */ - if (tracelimit && !notrace) + if (tracelimit) tracing(0); |