linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: linux-rt-users@vger.kernel.org
Cc: jkacur@redhat.com, williams@redhat.com
Subject: [PATCH 1/4] cyclictest: tracing(): check for notrace
Date: Thu, 25 Feb 2016 11:29:14 -0500	[thread overview]
Message-ID: <1456417757-13444-2-git-send-email-lcapitulino@redhat.com> (raw)
In-Reply-To: <1456417757-13444-1-git-send-email-lcapitulino@redhat.com>

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>
---
 src/cyclictest/cyclictest.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index 34053c5..54fc033 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -444,6 +444,9 @@ static void tracemark(char *fmt, ...)
 
 void tracing(int on)
 {
+	if (notrace)
+		return;
+
 	if (on) {
 		switch (kernelversion) {
 		case KV_26_LT18: gettimeofday(0,(struct timezone *)1); break;
@@ -1634,7 +1637,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);
 }
 
@@ -2164,7 +2167,7 @@ int main(int argc, char **argv)
 	}
  out:
 	/* ensure that the tracer is stopped */
-	if (tracelimit && !notrace)
+	if (tracelimit)
 		tracing(0);
 
 
-- 
2.1.0


  reply	other threads:[~2016-02-25 16:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-25 16:29 [PATCH 0/4] cyclictest: improve running under trace-cmd Luiz Capitulino
2016-02-25 16:29 ` Luiz Capitulino [this message]
2016-02-25 16:29 ` [PATCH 2/4] cyclictest: move debugfs init code to its own function Luiz Capitulino
2016-02-25 16:29 ` [PATCH 3/4] cyclictest: move tracemark_fd handling " Luiz Capitulino
2016-02-25 16:29 ` [PATCH 4/4] cyclictest: add --tracemark option Luiz Capitulino
2016-03-16 21:23 ` [PATCH 0/4] cyclictest: improve running under trace-cmd Luiz Capitulino
2016-03-16 22:37   ` John Kacur
2016-03-17 13:48     ` Luiz Capitulino
  -- strict thread matches above, loose matches on Subject: below --
2016-03-17 18:30 [PATCH v2 " Luiz Capitulino
2016-03-17 18:30 ` [PATCH 1/4] cyclictest: tracing(): check for notrace Luiz Capitulino
2016-03-22 14:37   ` John Kacur

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1456417757-13444-2-git-send-email-lcapitulino@redhat.com \
    --to=lcapitulino@redhat.com \
    --cc=jkacur@redhat.com \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=williams@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).