* [PATCH]cyclictest: Arrange alphabetically for readability of "cyclictest --help".
@ 2009-07-03 4:04 GeunSik Lim
2010-01-21 0:09 ` [PATCH]cyclictest: CFLAGS to support static compiliation with ARM Crosscompiler GeunSik Lim
0 siblings, 1 reply; 6+ messages in thread
From: GeunSik Lim @ 2009-07-03 4:04 UTC (permalink / raw)
To: williams; +Cc: linux-rt-users, tglx
Hi,
This is trivial patch.
But, We need readbility about output of the "#>cyclictest --help" command.
Thks,
GeunSik Lim.
== CUT HERE ==
Subject: [PATCH]cyclictest: Arrange alphabetically for readability of "cyclictest --help".
When we use "#> cyclictest --help" command, we are confusing because of
random order of many options. Arrange alphabetically.
After Patch)
[root@fedora11 rt-tests]# ./cyclictest --help
cyclictest V 0.46
Usage:
cyclictest <options>
-a [NUM] --affinity run thread #N on processor #N, if possible
with NUM pin all threads to the processor NUM
-b USEC --breaktrace=USEC send break trace command when latency > USEC
-B --preemptirqs both preempt and irqsoff tracing (used with -b)
-c CLOCK --clock=CLOCK select clock
0 = CLOCK_MONOTONIC (default)
1 = CLOCK_REALTIME
-C --context context switch tracing (used with -b)
-d DIST --distance=DIST distance of thread intervals in us default=500
-D --duration=t specify a length for the test run
default is in seconds, but 'm', 'h', or 'd' maybe added
to modify value to minutes, hours or days
-E --event event tracing (used with -b)
-f --ftrace function trace (when -b is active)
-h --histogram=US dump a latency histogram to stdout after the run
(with same priority about many threads)
US is the max time to be be tracked in microseconds
-i INTV --interval=INTV base interval of thread in us default=1000
-I --irqsoff Irqsoff tracing (used with -b)
-l LOOPS --loops=LOOPS number of loops: default=0(endless)
-m --mlockall lock current and future memory allocations
-n --nanosleep use clock_nanosleep
-N --nsecs print results in ns instead of ms (default ms)
-o RED --oscope=RED oscilloscope mode, reduce verbose output by RED
-O TOPT --traceopt=TOPT trace option
-p PRIO --prio=PRIO priority of highest prio thread
-P --preemptoff Preempt off tracing (used with -b)
-q --quiet print only a summary on exit
-r --relative use relative timer instead of absolute
-s --system use sys_nanosleep and sys_setitimer
-t --threads one thread per available processor
-t [NUM] --threads=NUM number of threads:
without NUM, threads = max_cpus
without -t default = 1
-T TRACE --tracer=TRACER set tracing function
configured tracers: unavailable (debugfs not mounted)
-v --verbose output values on stdout for statistics
format: n:c:v n=tasknum c=count v=value in us
-w --wakeup task wakeup tracing (used with -b)
-W --wakeuprt rt task wakeup tracing (used with -b)
-y POLI --policy=POLI policy of realtime thread (1:FIFO, 2:RR)
format: --policy=1(default) or --policy=2
Signed-by-off: GeunSik Lim <geunsik.lim@samsung.com>
---
src/cyclictest/cyclictest.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index 4a6f634..d16782b 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -763,8 +763,14 @@ 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"
+ " (with same priority about many threads)\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"
@@ -772,26 +778,20 @@ static void display_help(void)
"-n --nanosleep use clock_nanosleep\n"
"-N --nsecs print results in ns instead of ms (default ms)\n"
"-o RED --oscope=RED oscilloscope mode, reduce verbose output by RED\n"
- "-O TOPT --traceopt=TOPT trace option\n"
+ "-O TOPT --traceopt=TOPT trace option\n"
"-p PRIO --prio=PRIO priority of highest prio thread\n"
"-P --preemptoff Preempt off tracing (used with -b)\n"
"-q --quiet print only a summary on exit\n"
"-r --relative use relative timer instead of absolute\n"
"-s --system use sys_nanosleep and sys_setitimer\n"
- "-T TRACE --tracer=TRACER set tracing function\n"
- " configured tracers: %s\n"
"-t --threads one thread per available processor\n"
"-t [NUM] --threads=NUM number of threads:\n"
" without NUM, threads = max_cpus\n"
" without -t default = 1\n"
+ "-T TRACE --tracer=TRACER set tracing function\n"
+ " configured tracers: %s\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"
- "-h --histogram=US dump a latency histogram to stdout after the run\n"
- " (with same priority about many threads)\n"
- " US is the max time to be be tracked in microseconds\n"
"-w --wakeup task wakeup tracing (used with -b)\n"
"-W --wakeuprt rt task wakeup tracing (used with -b)\n"
"-y POLI --policy=POLI policy of realtime thread (1:FIFO, 2:RR)\n"
--
1.6.3.1
-----------------------------------------------
To unsubscribe from this list: send the line "unsubscribe linux-***"
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/
GeunSik Lim ( Samsung Electronics )
e-Mail :1) geunsik.lim@samsung.com
2) leemgs@gmail.com , leemgs1@gmail.com
HomePage: http://blog.naver.com/invain/
-----------------------------------------------
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH]cyclictest: CFLAGS to support static compiliation with ARM Crosscompiler
2009-07-03 4:04 [PATCH]cyclictest: Arrange alphabetically for readability of "cyclictest --help" GeunSik Lim
@ 2010-01-21 0:09 ` GeunSik Lim
2010-01-21 0:40 ` John Kacur
0 siblings, 1 reply; 6+ messages in thread
From: GeunSik Lim @ 2010-01-21 0:09 UTC (permalink / raw)
To: williams; +Cc: linux-rt-users, tglx
Dear williams,
This patch is for support static building using cross-compiler for
embedded targetboard like ARM.
When we use -static option for static binary on embedded board after
patch.
I tested various toolchain.(e.g: codesourcery toolchain , my self
toolchain , cross-tool project's toolchain)
Ref) Don't forget "-static" configuration(CFLAGS += -O2 -static) in
Makefile When you need static linking.
Before patch)
/usr/local/arm_v7_vfp_le/bin/../target/usr/lib/librt.a(timer_create.o):
In function `timer_create':
/home/build/BUILD/glibc-2.5.90/rt/../nptl/sysdeps/unix/sysv/linux/timer_create.c:174: undefined reference to `pthread_attr_init'
/home/build/BUILD/glibc-2.5.90/rt/../nptl/sysdeps/unix/sysv/linux/timer_create.c:192: undefined reference to `pthread_attr_setdetachstate'
/usr/local/arm_v7_vfp_le/bin/../target/usr/lib/librt.a(timer_routines.o): In function `__start_helper_thread':
/home/build/BUILD/glibc-2.5.90/rt/../nptl/sysdeps/unix/sysv/linux/timer_routines.c:144: undefined reference to `pthread_attr_init'
/home/build/BUILD/glibc-2.5.90/rt/../nptl/sysdeps/unix/sysv/linux/timer_routines.c:145: undefined reference to `pthread_attr_setstacksize'
/home/build/BUILD/glibc-2.5.90/rt/../nptl/sysdeps/unix/sysv/linux/timer_routines.c:171: undefined reference to `pthread_attr_destroy'
/home/build/BUILD/glibc-2.5.90/rt/../nptl/sysdeps/unix/sysv/linux/timer_routines.c:175: undefined reference to `pthread_atfork'
/usr/local/arm_v7_vfp_le/bin/../target/usr/lib/librt.a(timer_routines.o): In function `timer_helper_thread':
/home/build/BUILD/glibc-2.5.90/rt/../nptl/sysdeps/unix/sysv/linux/timer_routines.c:114: undefined reference to `pthread_exit'
collect2: ld returned 1 exit status
make: *** [cyclictest] Error 1
After patch) Success...
Fedora11$> file ./cyclictest
./cyclictest: ELF 32-bit LSB executable, ARM, version 1 (SYSV),
statically linked, for GNU/Linux 2.6.18, not stripped
====================================================================
>From 45e4dbeb8e7723cefa9117736b0ece5ea188ce6a Mon Sep 17 00:00:00 2001
From: Geunsik Lim <geunsik.lim@samsung.com>
Date: Thu, 21 Jan 2010 09:00:24 +0900
Subject: [PATCH 2/2] bugfix: Support static linking(-static) with
Crosscompiler on ARM targetboard.
This patch is for support static building using cross-compiler for
embedded targetboard like ARM.
When we use -static option for static binary on embedded board after
patch.
I tested various toolchain.(e.g: codesourcery toolchain , my self
toolchain , cross-tool project's toolchain)
Ref) Don't forget "-static" configuration(CFLAGS += -O2 -static) in
Makefile When you need static linking.
Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
---
Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index e14d957..65f506a 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ VERSION_STRING = 0.61
TARGETS = cyclictest signaltest pi_stress \
hwlatdetect rt-migrate-test ptsematest sigwaittest svsematest \
sendme pip
-LIBS = -lpthread -lrt
+LIBS = -lrt -lpthread
EXTRA_LIBS ?= -ldl # for get_cpu
DESTDIR ?=
prefix ?= /usr/local
--
1.6.2.5
--
-----------------------------------------------
To unsubscribe from this list: send the line "unsubscribe linux-***"
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/
GeunSik Lim ( Samsung Electronics )
e-Mail :1) geunsik.lim@samsung.com
2) leemgs@gmail.com , leemgs1@gmail.com
HomePage: http://blog.naver.com/invain/
-----------------------------------------------
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH]cyclictest: CFLAGS to support static compiliation with ARM Crosscompiler
2010-01-21 0:09 ` [PATCH]cyclictest: CFLAGS to support static compiliation with ARM Crosscompiler GeunSik Lim
@ 2010-01-21 0:40 ` John Kacur
2010-01-21 1:37 ` GeunSik Lim
0 siblings, 1 reply; 6+ messages in thread
From: John Kacur @ 2010-01-21 0:40 UTC (permalink / raw)
To: leemgs1; +Cc: williams, linux-rt-users, tglx
On Thu, Jan 21, 2010 at 1:09 AM, GeunSik Lim <leemgs1@gmail.com> wrote:
>
> Dear williams,
>
> This patch is for support static building using cross-compiler for
> embedded targetboard like ARM.
> When we use -static option for static binary on embedded board after
> patch.
> I tested various toolchain.(e.g: codesourcery toolchain , my self
> toolchain , cross-tool project's toolchain)
> Ref) Don't forget "-static" configuration(CFLAGS += -O2 -static) in
> Makefile When you need static linking.
>
> Before patch)
> /usr/local/arm_v7_vfp_le/bin/../target/usr/lib/librt.a(timer_create.o):
> In function `timer_create':
> /home/build/BUILD/glibc-2.5.90/rt/../nptl/sysdeps/unix/sysv/linux/timer_create.c:174: undefined reference to `pthread_attr_init'
> /home/build/BUILD/glibc-2.5.90/rt/../nptl/sysdeps/unix/sysv/linux/timer_create.c:192: undefined reference to `pthread_attr_setdetachstate'
> /usr/local/arm_v7_vfp_le/bin/../target/usr/lib/librt.a(timer_routines.o): In function `__start_helper_thread':
> /home/build/BUILD/glibc-2.5.90/rt/../nptl/sysdeps/unix/sysv/linux/timer_routines.c:144: undefined reference to `pthread_attr_init'
> /home/build/BUILD/glibc-2.5.90/rt/../nptl/sysdeps/unix/sysv/linux/timer_routines.c:145: undefined reference to `pthread_attr_setstacksize'
> /home/build/BUILD/glibc-2.5.90/rt/../nptl/sysdeps/unix/sysv/linux/timer_routines.c:171: undefined reference to `pthread_attr_destroy'
> /home/build/BUILD/glibc-2.5.90/rt/../nptl/sysdeps/unix/sysv/linux/timer_routines.c:175: undefined reference to `pthread_atfork'
> /usr/local/arm_v7_vfp_le/bin/../target/usr/lib/librt.a(timer_routines.o): In function `timer_helper_thread':
> /home/build/BUILD/glibc-2.5.90/rt/../nptl/sysdeps/unix/sysv/linux/timer_routines.c:114: undefined reference to `pthread_exit'
> collect2: ld returned 1 exit status
> make: *** [cyclictest] Error 1
>
>
> After patch) Success...
> Fedora11$> file ./cyclictest
> ./cyclictest: ELF 32-bit LSB executable, ARM, version 1 (SYSV),
> statically linked, for GNU/Linux 2.6.18, not stripped
>
> ====================================================================
>
> >From 45e4dbeb8e7723cefa9117736b0ece5ea188ce6a Mon Sep 17 00:00:00 2001
> From: Geunsik Lim <geunsik.lim@samsung.com>
> Date: Thu, 21 Jan 2010 09:00:24 +0900
> Subject: [PATCH 2/2] bugfix: Support static linking(-static) with
> Crosscompiler on ARM targetboard.
>
> This patch is for support static building using cross-compiler for
> embedded targetboard like ARM.
> When we use -static option for static binary on embedded board after
> patch.
> I tested various toolchain.(e.g: codesourcery toolchain , my self
> toolchain , cross-tool project's toolchain)
> Ref) Don't forget "-static" configuration(CFLAGS += -O2 -static) in
> Makefile When you need static linking.
>
> Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
> ---
> Makefile | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index e14d957..65f506a 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -3,7 +3,7 @@ VERSION_STRING = 0.61
> TARGETS = cyclictest signaltest pi_stress \
> hwlatdetect rt-migrate-test ptsematest sigwaittest svsematest \
> sendme pip
> -LIBS = -lpthread -lrt
> +LIBS = -lrt -lpthread
> EXTRA_LIBS ?= -ldl # for get_cpu
> DESTDIR ?=
> prefix ?= /usr/local
> --
> 1.6.2.5
>
Did you leave something out?
Thanks
John
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH]cyclictest: CFLAGS to support static compiliation with ARM Crosscompiler
2010-01-21 0:40 ` John Kacur
@ 2010-01-21 1:37 ` GeunSik Lim
2010-01-21 11:40 ` John Kacur
0 siblings, 1 reply; 6+ messages in thread
From: GeunSik Lim @ 2010-01-21 1:37 UTC (permalink / raw)
To: John Kacur; +Cc: williams, linux-rt-users, tglx
On Thu, Jan 21, 2010 at 9:40 AM, John Kacur <jkacur@redhat.com> wrote:
>
> Did you leave something out?
Not at all.
I summary, We have to change CFLAGS from "-lpthread -lrt" to "-lrt
-lpthread" to compile
rt-tests source successfully for static linking with GCC based arm
cross compiler.
This is testcase.
Fedora11#> git clone
git://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rt-tests.git
Fedora11#> cd rt-tests
Fedora11#> vi Makefile ( for static linking)
CFLAGS += -O2 -static <--- Edit this line.
Fedora11#> make CC=arm-linux-eabi-gcc
We will meet some errors like "undefined reference to . . . . . .
" messages.
Thanks reading.
Geunsik Lim.
> Thanks
> John
>
--
Regards,
GeunSik Lim ( Samsung Electronics )
Blog : http://blog.naver.com/invain/
e-Mail: geunsik.lim@samsung.com
leemgs@gmail.com , leemgs1@gmail.com
--
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/
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH]cyclictest: CFLAGS to support static compiliation with ARM Crosscompiler
2010-01-21 1:37 ` GeunSik Lim
@ 2010-01-21 11:40 ` John Kacur
2010-01-21 13:10 ` GeunSik Lim
0 siblings, 1 reply; 6+ messages in thread
From: John Kacur @ 2010-01-21 11:40 UTC (permalink / raw)
To: GeunSik Lim; +Cc: williams, linux-rt-users, tglx
On Thu, 21 Jan 2010, GeunSik Lim wrote:
> On Thu, Jan 21, 2010 at 9:40 AM, John Kacur <jkacur@redhat.com> wrote:
> >
> > Did you leave something out?
> Not at all.
> I summary, We have to change CFLAGS from "-lpthread -lrt" to "-lrt
> -lpthread" to compile
> rt-tests source successfully for static linking with GCC based arm
> cross compiler.
>
> This is testcase.
> Fedora11#> git clone
> git://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rt-tests.git
> Fedora11#> cd rt-tests
> Fedora11#> vi Makefile ( for static linking)
> CFLAGS += -O2 -static <--- Edit this line.
> Fedora11#> make CC=arm-linux-eabi-gcc
> We will meet some errors like "undefined reference to . . . . . .
> " messages.
Okay, I tested that change on normal x86_64 with the static flag, and it
does seem to work, so I have no problem with your change.
Are you sure you need a -static link flag for embedded? I was talking to
another arm developer who also cross compiles but doesn't need it.
Also, the reason I asked whether something was missing, is that the text
to your patch contains "Subject: [PATCH 2/2] bugfix: Support static
linking(-static) with"
so I was wondering where Patch 1/2 was.
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH]cyclictest: CFLAGS to support static compiliation with ARM Crosscompiler
2010-01-21 11:40 ` John Kacur
@ 2010-01-21 13:10 ` GeunSik Lim
0 siblings, 0 replies; 6+ messages in thread
From: GeunSik Lim @ 2010-01-21 13:10 UTC (permalink / raw)
To: John Kacur; +Cc: williams, linux-rt-users, tglx
On Thu, Jan 21, 2010 at 8:40 PM, John Kacur <jkacur@redhat.com> wrote:
>
>
> On Thu, 21 Jan 2010, GeunSik Lim wrote:
>
>> On Thu, Jan 21, 2010 at 9:40 AM, John Kacur <jkacur@redhat.com> wrote:
>> >
>> > Did you leave something out?
>> Not at all.
>> I summary, We have to change CFLAGS from "-lpthread -lrt" to "-lrt
>> -lpthread" to compile
>> rt-tests source successfully for static linking with GCC based arm
>> cross compiler.
>>
>> This is testcase.
>> Fedora11#> git clone
>> git://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rt-tests.git
>> Fedora11#> cd rt-tests
>> Fedora11#> vi Makefile ( for static linking)
>> CFLAGS += -O2 -static <--- Edit this line.
>> Fedora11#> make CC=arm-linux-eabi-gcc
>> We will meet some errors like "undefined reference to . . . . . .
>> " messages.
>
> Okay, I tested that change on normal x86_64 with the static flag, and it
> does seem to work, so I have no problem with your change.
Thank you for verification on X86 64bit.
For reference, I tested that change on X86 32bit with the "-static"option.
>
> Are you sure you need a -static link flag for embedded? I was talking to
> another arm developer who also cross compiles but doesn't need it.
Of course. In general, Most embedded developers use shared linking for
Embedded environment. But, Consider some case like Speedup and
independent binary for debugging. In this case, We need useful
"-static"option.
>
> Also, the reason I asked whether something was missing, is that the text
> to your patch contains "Subject: [PATCH 2/2] bugfix: Support static
> linking(-static) with"
>
> so I was wondering where Patch 1/2 was.
>
Sorry. I mistook.:)
Patch is just one.
> Thanks.
>
--
Regards,
GeunSik Lim ( Samsung Electronics )
Blog : http://blog.naver.com/invain/
e-Mail: geunsik.lim@samsung.com
leemgs@gmail.com , leemgs1@gmail.com
--
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/
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-01-21 13:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-03 4:04 [PATCH]cyclictest: Arrange alphabetically for readability of "cyclictest --help" GeunSik Lim
2010-01-21 0:09 ` [PATCH]cyclictest: CFLAGS to support static compiliation with ARM Crosscompiler GeunSik Lim
2010-01-21 0:40 ` John Kacur
2010-01-21 1:37 ` GeunSik Lim
2010-01-21 11:40 ` John Kacur
2010-01-21 13:10 ` GeunSik Lim
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).