From: GeunSik Lim <leemgs1@gmail.com>
To: Clark Williams <williams@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>
Cc: rt-users <linux-rt-users@vger.kernel.org>
Subject: Re: cyclictest - duplicate explanation of cyclictest option
Date: Mon, 6 Apr 2009 17:29:04 +0900 [thread overview]
Message-ID: <49b7c2350904060129r640a3db6r5487e72f2cf6330f@mail.gmail.com> (raw)
In-Reply-To: <49b7c2350904051956n214efbb5pc8cd9990820a534f@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 7088 bytes --]
Dear Thomas & Clark,
This is e-mail about patch to support wakeup & wakeup_rt tracing additionally
at the argument of cyclictest.
Currently, cyclictest v 0.34 support three tracing like PREEMPTOFF ,
IRQSOFF , PREEMPTIRQSOFF.
I want you to append WAKEUP & WAKEUP_RT at the current cyclictest version.
and, cyclictest ver 0.34 have a bug about context switching and event option.
for example,
we can not use "-C" option without --context option.
we can not use "-E" option without --event option.
Belows is result after patching in sequence.
1) adjust "remove-duplicate-h-option.patch" file.
2) and then, adjust
"add-wakeup-wakeuprt-tracing-and-misc-bugfix.patch" file.
Hope this helps. If I mistake, correct me.
Thanks.
After Patching ....
#### [ wakeup test]###############################################
[root@fedora9 rt-tests-temp0]# cat /debug/tracing/available_tracers
syscall blk kmemtrace power branch function_graph mmiotrace wakeup_rt
wakeup preemptirqsoff preemptoff irqsoff function sched_switch
initcall nop
[root@fedora9 rt-tests-temp0]# ./cyclictest -t 2 -b 200 -W -D 5
could not set latency_hist/wakeup_latency/reset to 1
0.16 0.27 0.21 2/308 2521
T: 0 ( 2520) P: 0 I:1000 C: 4288 Min: 16 Act: 27 Avg: 28 Max: 152
T: 1 ( 2521) P: 0 I:1500 C: 2859 Min: 19 Act: 29 Avg: 27 Max: 72
[root@fedora9 rt-tests-temp0]# cat /debug/tracing/trace
# tracer: wakeup
#
# wakeup latency trace v1.1.5 on 2.6.29-rt2-ftrace
# --------------------------------------------------------------------
# latency: 20 us, #3/3, CPU#2 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:4)
# -----------------
# | task: gnome-terminal-3884 (uid:504 nice:0 policy:0 rt_prio:0)
# -----------------
#
# _------=> CPU#
# / _-----=> irqs-off
# | / _----=> need-resched
# || / _---=> hardirq/softirq
# ||| / _--=> preempt-depth
# |||| /
# ||||| delay
# cmd pid ||||| time | caller
# \ / ||||| \ | /
gnome-te-3884 2d.h. 1us+: irq_enter <-smp_apic_timer_interrupt
gnome-te-3884 2dN.1 20us : irq_exit <-smp_apic_timer_interrupt
gnome-te-3884 2dN.1 21us : trace_preempt_on <-smp_apic_timer_interrupt
#####[ Context Switching Test]#####################################
[root@fedora9 rt-tests-temp0]# ./cyclictest -t 10 -b 100000 -C -m -D 5
could not set latency_hist/wakeup_latency/reset to 1
0.17 0.17 0.17 1/326 2706
T: 0 ( 2697) P: 0 I:1000 C: 4000 Min: 12 Act: 21 Avg: 20 Max: 107
T: 1 ( 2698) P: 0 I:1500 C: 2667 Min: 13 Act: 27 Avg: 22 Max: 138
T: 2 ( 2699) P: 0 I:2000 C: 2000 Min: 12 Act: 13 Avg: 13 Max: 40
T: 3 ( 2700) P: 0 I:2500 C: 1600 Min: 12 Act: 16 Avg: 13 Max: 41
T: 4 ( 2701) P: 0 I:3000 C: 1334 Min: 12 Act: 15 Avg: 13 Max: 39
T: 5 ( 2702) P: 0 I:3500 C: 1143 Min: 12 Act: 28 Avg: 16 Max: 61
T: 6 ( 2703) P: 0 I:4000 C: 1000 Min: 12 Act: 13 Avg: 13 Max: 102
T: 7 ( 2704) P: 0 I:4500 C: 889 Min: 12 Act: 13 Avg: 15 Max: 184
T: 8 ( 2705) P: 0 I:5000 C: 800 Min: 12 Act: 13 Avg: 13 Max: 32
T: 9 ( 2706) P: 0 I:5500 C: 728 Min: 12 Act: 15 Avg: 15 Max: 54
[root@fedora9 rt-tests-temp0]# cat /debug/tracing/trace |head
# tracer: sched_switch
#
# TASK-PID CPU# TIMESTAMP FUNCTION
# | | | | |
##### CPU 0 buffer started ####
<idle>-0 [000] 1107.917632: 0:140:R + [000]
10: 49:D sirq-sched/0
<idle>-0 [000] 1107.917635: 0:140:R + [000]
5: 49:D sirq-timer/0
<idle>-0 [000] 1107.917642: 0:140:R ==> [000]
10: 49:R sirq-sched/0
sirq-sched/0-10 [000] 1107.917655: 10: 49:D ==> [000]
5: 49:R sirq-timer/0
sirq-timer/0-5 [000] 1107.917660: 5: 49:D ==> [000]
0:140:R <idle>
[root@fedora9 rt-tests-temp0]#
#################################################################################
2009/4/6 GeunSik Lim <leemgs1@gmail.com>:
> Dear Clark,
>
> This is trivial contents about option of cyclictest.
>
> Cyclictest utiltiy (ver 0.34) display the information with duplicate
> "-h" options,
> when a user run "cyclictest --help" command.
> User will confuse exact understanding because of duplicate
> description of -h option.
> How about you remove "-h H_MAX *****" line?
> Thanks reading.
>
> Signed-off-by: GeunSik Lim <leemgs1@gmail.com>
>
> diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
> index f878217..cedc36f 100644
> --- a/src/cyclictest/cyclictest.c
> +++ b/src/cyclictest/cyclictest.c
> @@ -688,7 +688,8 @@ static void display_help(void)
> "-d DIST --distance=DIST distance of thread
> intervals in us default=500\n"
> "-E --event event tracing (used with -b)\n"
> "-f --ftrace function trace (when -b is active)\n"
> - "-h H_MAX latency histogram size in
> us default 0 (off)\n"
> + "-h --histogram=US dump a latency histogram to
> stdout after the run\n"
> + " US is the max time to be be
> tracked in microseconds\n"
> "-i INTV --interval=INTV base interval of thread in
> us default=1000\n"
> "-I --irqsoff Irqsoff tracing (used with -b)\n"
> "-l LOOPS --loops=LOOPS number of loops:
> default=0(endless)\n"
> @@ -710,8 +711,6 @@ static void display_help(void)
> "-D --duration=t specify a length for the test run\n"
> " default is in seconds, but
> 'm', 'h', or 'd' maybe added\n"
> " to modify value to minutes,
> hours or days\n"
> - "-h --histogram=US dump a latency histogram to
> stdout after the run\n"
> - " US is the max time to be be
> tracked in microseconds\n"
> );
> exit(0);
> }
>
>
> --
> Regards,
> GeunSik Lim
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
Regards,
GeunSik Lim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[-- Attachment #2: add-wakeup-wakeuprt-tracing-and-misc-bugfix.patch --]
[-- Type: application/octet-stream, Size: 6055 bytes --]
Author: GeunSik Lim <leemgs1@gmail.com>
Date: Mon Apr 6 17:15:09 2009 +0900
Support wakeup tracing and misc bugfix.
This is patch to support wakeup & wakeup_rt tracing at the argument of cyclictest additionally.
Currently, cyclictest(ver 0.34) support three tracing like PREEMPTOFF, IRQSOFF, PREEMPTIRQSOFF.
I want you to append WAKEUP & WAKEUP_RT tracing at the current cyclictest version.
and, cyclictest ver 0.34 have a misc bug about context switching and event option.
for example,
we can not use "-C" option without --context option.
we can not use "-E" option without --event option.
Signed-off-by: GeunSik Lim <leemgs1@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Clark Williams <williams@redhat.com>
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index cedc36f..746b44f 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -93,6 +93,8 @@ enum {
IRQSOFF,
PREEMPTOFF,
IRQPREEMPTOFF,
+ WAKEUP,
+ WAKEUPRT,
};
#define HIST_MAX 1000000
@@ -415,6 +417,12 @@ static void setup_tracer(void)
case CTXTSWITCH:
ret = settracer("sched_switch");
break;
+ case WAKEUP:
+ ret = settracer("wakeup");
+ break;
+ case WAKEUPRT:
+ ret = settracer("wakeup_rt");
+ break;
default:
printf("cyclictest: unknown tracer!\n");
ret = 0;
@@ -686,6 +694,9 @@ static void display_help(void)
" 1 = CLOCK_REALTIME\n"
"-C --context context switch tracing (used with -b)\n"
"-d DIST --distance=DIST distance of thread intervals in us default=500\n"
+ "-D --duration=t specify a length for the test run\n"
+ " default is in seconds, but 'm', 'h', or 'd' maybe added\n"
+ " to modify value to minutes, hours or days\n"
"-E --event event tracing (used with -b)\n"
"-f --ftrace function trace (when -b is active)\n"
"-h --histogram=US dump a latency histogram to stdout after the run\n"
@@ -708,9 +719,8 @@ static void display_help(void)
" without -t default = 1\n"
"-v --verbose output values on stdout for statistics\n"
" format: n:c:v n=tasknum c=count v=value in us\n"
- "-D --duration=t specify a length for the test run\n"
- " default is in seconds, but 'm', 'h', or 'd' maybe added\n"
- " to modify value to minutes, hours or days\n"
+ "-w --wakeup rt task wakeup tracing (used with -b)\n"
+ "-W --wakeuprt non_rt task wakeup_rt tracing (used with -b)\n"
);
exit(0);
}
@@ -755,6 +765,7 @@ static void process_options (int argc, char *argv[])
{"clock", required_argument, NULL, 'c'},
{"context", no_argument, NULL, 'C'},
{"distance", required_argument, NULL, 'd'},
+ {"duration",required_argument, NULL, 'D'},
{"event", no_argument, NULL, 'E'},
{"ftrace", no_argument, NULL, 'f'},
{"histogram", required_argument, NULL, 'h'},
@@ -772,11 +783,12 @@ static void process_options (int argc, char *argv[])
{"system", no_argument, NULL, 's'},
{"threads", optional_argument, NULL, 't'},
{"verbose", no_argument, NULL, 'v'},
- {"duration",required_argument, NULL, 'D'},
+ {"wakeup", no_argument, NULL, 'w'},
+ {"wakeuprt", no_argument, NULL, 'W'},
{"help", no_argument, NULL, '?'},
{NULL, 0, NULL, 0}
};
- int c = getopt_long (argc, argv, "a::b:Bc:d:fh:i:Il:nNo:p:Pmqrst::vD:",
+ int c = getopt_long (argc, argv, "a::b:BcC:dD:Efh:i:Il:mnNo:p:Pqrst::v:wW:",
long_options, &option_index);
if (c == -1)
break;
@@ -797,12 +809,14 @@ static void process_options (int argc, char *argv[])
case 'c': clocksel = atoi(optarg); break;
case 'C': tracetype = CTXTSWITCH; break;
case 'd': distance = atoi(optarg); break;
+ case 'D': duration = parse_time_string(optarg); break;
case 'E': tracetype = EVENTS; break;
case 'f': ftrace = 1; break;
case 'h': histogram = atoi(optarg); break;
case 'i': interval = atoi(optarg); break;
case 'I': tracetype = IRQSOFF; break;
case 'l': max_cycles = atoi(optarg); break;
+ case 'm': lockall = 1; break;
case 'n': use_nanosleep = MODE_CLOCK_NANOSLEEP; break;
case 'N': use_nsecs = 1; break;
case 'o': oscope_reduction = atoi(optarg); break;
@@ -820,9 +834,8 @@ static void process_options (int argc, char *argv[])
num_threads = max_cpus;
break;
case 'v': verbose = 1; break;
- case 'm': lockall = 1; break;
- case 'D': duration = parse_time_string(optarg);
- break;
+ case 'w': tracetype = WAKEUP; break;
+ case 'W': tracetype = WAKEUPRT; break;
case '?': error = 1; break;
}
}
next prev parent reply other threads:[~2009-04-06 8:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-06 2:56 cyclictest - duplicate explanation of cyclictest option GeunSik Lim
2009-04-06 8:29 ` GeunSik Lim [this message]
2009-04-06 23:15 ` GeunSik Lim
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=49b7c2350904060129r640a3db6r5487e72f2cf6330f@mail.gmail.com \
--to=leemgs1@gmail.com \
--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).