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: cyclictest - fix comparison about flexible word counts of available_tracers file.
Date: Sun, 5 Apr 2009 15:45:33 +0900 [thread overview]
Message-ID: <49b7c2350904042345x574edfcbx553ba1caccb8bd06@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2955 bytes --]
Dear Thomas,
I found bug at settracer function of cyclictest.c source (rt-test ver 0.33).
settracer func use 10 times in the for() statement to searching tracer
like preemptoff , irqsoff , preemptirqsoff.
But, I think that we have to consider 10+ words in the available_tracers file.
[root@fedora9 tracing]# cd /debug/tracing/
[root@fedora9 tracing]# cat available_tracers
syscall blk kmemtrace power branch function_graph mmiotrace wakeup_rt
wakeup preemptirqsoff preemptoff irqsoff function sched_switch
initcall nop
[root@fedora9 tracing]# cat available_tracers | wc -w
16
[root@fedora9 tracing]#
[root@fedora9 tracing]# git clone
git://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rt-tests.git
[root@fedora9 tracing]# cd rt-tests
[root@fedora9 tracing]# make clean ; make all
[root@fedora9 tracing]# ./cyclictest -n -t 3 -b 1000000 -P-D 2 --> Success
[root@fedora9 tracing]#./cyclictest -n -t 3 -b 1000000 -I -D 2 --> Failed
[root@fedora9 tracing]#./cyclictest -n -t 3 -b 1000000 -B-D 2 --> Failed
So I made patch file to consider above case.
If I mistake, correct me.
--------------------------------------------------
[root@fedora9 cyclictest]# diff -urN ./cyclictest.c.ori ./cyclictest.c
--- ./cyclictest.c.ori 2009-04-05 23:48:03.000000000 +0900
+++ ./cyclictest.c 2009-04-06 00:15:51.000000000 +0900
@@ -320,7 +320,7 @@
char name[100];
FILE *fp;
int ret;
- int i;
+ //int i;
/* Make sure tracer is available */
strncpy(filename, debugfileprefix, sizeof(filename));
@@ -330,7 +330,7 @@
if (!fp)
return -1;
- for (i = 0; i < 10; i++) {
+ while(1) {
ret = fscanf(fp, "%99s", name);
if (!ret) {
ret = -1;
--------------------------------------------------
After patching .....
[root@fedora9 tracing]#./cyclictest -n -t 3 -b 1000000 -I -D 2
[root@fedora9 tracing]# cat trace
# tracer: irqsoff
#
# irqsoff latency trace v1.1.5 on 2.6.29.1-rt4.20090403-ftrace-lgs
# --------------------------------------------------------------------
# latency: 108 us, #3/3, CPU#0 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2)
# -----------------
# | task: swapper-0 (uid:0 nice:0 policy:0 rt_prio:0)
# -----------------
#
# _------=> CPU#
# / _-----=> irqs-off
# | / _----=> need-resched
# || / _---=> hardirq/softirq
# ||| / _--=> preempt-depth
# |||| /
# ||||| delay
# cmd pid ||||| time | caller
# \ / ||||| \ | /
<idle>-0 0d..1 3us!: acpi_idle_do_entry <-acpi_idle_enter_bm
<idle>-0 0.N.1 107us+: cpu_idle <-rest_init
<idle>-0 0.N.1 110us : trace_preempt_on <-rest_init
--
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: fix-comparison-wordcount-available-tracers.patch --]
[-- Type: application/octet-stream, Size: 444 bytes --]
--- ./cyclictest.c.ori 2009-04-05 23:48:03.000000000 +0900
+++ ./cyclictest.c 2009-04-06 00:15:51.000000000 +0900
@@ -320,7 +320,7 @@
char name[100];
FILE *fp;
int ret;
- int i;
+ //int i;
/* Make sure tracer is available */
strncpy(filename, debugfileprefix, sizeof(filename));
@@ -330,7 +330,7 @@
if (!fp)
return -1;
- for (i = 0; i < 10; i++) {
+ while(1) {
ret = fscanf(fp, "%99s", name);
if (!ret) {
ret = -1;
next reply other threads:[~2009-04-05 6:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-05 6:45 GeunSik Lim [this message]
2009-04-05 14:05 ` cyclictest - fix comparison about flexible word counts of available_tracers file Thomas Gleixner
2009-04-05 14:50 ` Clark Williams
2009-04-06 2:49 ` 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=49b7c2350904042345x574edfcbx553ba1caccb8bd06@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).