linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Mc Guire <der.herr@hofr.at>
To: williams@redhat.com
Cc: tglx@linutronix.de, carsten.emde@osadl.org,
	linux-rt-users@vger.kernel.org
Subject: cyclictest - minor change request for histogram
Date: Fri, 10 Feb 2012 13:45:56 +0100	[thread overview]
Message-ID: <20120210124556.GA7487@opentech.at> (raw)


HI !

 minor change request to the histogram in cyclictest to record the
 comandline - needed for confused people like me ...

 I would prefere if the commandline with the parameters used during the
 test-run would be recorded in the histogram output - thats what the 
 below patch does. i.e. runing:

hofrat@debian:~/rt-tests$ ./cyclictest -q -p 10 -n -h 50 -l 1000

would result in the histogram begin displayed as

# cmdline: ./cyclictest -q -p 10 -n -h 50 -l 1000
# Histogram
000000 000000
000001 000000
000002 000000
...

thx!
hofrat 


diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index 731b4bd..66a68ed 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -942,6 +942,7 @@ static char *policyname(int policy)
 static void process_options (int argc, char *argv[])
 {
 	int error = 0;
+	int i = 0;
 	int max_cpus = sysconf(_SC_NPROCESSORS_CONF);
 
 	for (;;) {
@@ -1136,6 +1137,13 @@ static void process_options (int argc, char *argv[])
 		warn("distance is ignored and set to 0, if histogram enabled\n");
 	if (distance == -1)
 		distance = DEFAULT_DISTANCE;
+	if (histogram) {
+		printf("# cmdline:");
+		for (i = 0; i < argc; i++) {
+			printf(" %s", argv[i]);
+		}
+		printf("\n");
+	}
 
 	if (priority < 0 || priority > 99)
 		error = 1;

                 reply	other threads:[~2012-02-10 12:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20120210124556.GA7487@opentech.at \
    --to=der.herr@hofr.at \
    --cc=carsten.emde@osadl.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --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).