On Fri, Jun 5, 2009 at 3:58 AM, Herman ten Brugge<hermantenbrugge@xxxxxxx> wrote: > I have written some code to convert the ascii sched_switch output to > vcd format (value change data). Now it is possible to view the context > switches in a vcd viewer. I personally use gtkwave because it is free > and is present in the fedora repository. > To use this program first make a ftrace file with something like: Hi Herman ten Brugge, Thansk you for sharing your code to visualize sched_switch ftrace data with vcd viewer like GTKWave. This is my H/W requirements. * core: Core2 Quad Q9300 * Memory: DDR3G * Kernel: 2.6.29-3.fc10.i686.smp kernel I tested in my fedora 9 distribution with below methods. But I can not show normal result using "#> gtkware trace.vcd" command. * screenshot : http://blogfiles5.naver.net/data43/2009/6/12/228/gtkwave-vcd-20090609.1503-invain.png It seems that you have to update your code for stablization and functions continually. F-Geunsik#> wget http://www.osadl.org/uploads/media/sched_switch-0.1.tgz F-Geunsik#> tar -zxvf sched_switch-0.1.tgz F-Geunsik#> cd sched_switch-0.1 F-Geunsik#> make F-Geunsik#> cp ./sched_switch /usr/bin/ F-Geunsik#> cd /syskerneldebug/tracing/ F-Geunsik#> echo sched_switch >current_tracer F-Geunsik#> echo 1 >tracing_enable F-Geunsik#> chrt -f 20 sleep 5 F-Geunsik#> cyclictest -t 5 -p 99 -d 60 -i 1000 F-Geunsik#> echo 0 >tracing_enable F-Geunsik#> cat trace >/tmp/trace.txt F-Geunsik#> /usr/bin/sched_switch /tmp/trace.txt /tmp/trace.vcd F-Geunsik#> yum install gtkwave F-Geunsik#> gtkwave /tmp/trace.vcd -- Regards, GeunSik Lim ( Samsung Electronics ) Blog : http://blog.naver.com/invain/ e-Mail: geunsik.lim@xxxxxxxxxxx leemgs@xxxxxxxxx , leemgs1@xxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
# tracer: sched_switch # # TASK-PID CPU# TIMESTAMP FUNCTION # | | | | | ##### CPU 2 buffer started #### <idle>-0 [002] 4154503800.848883: 0:140:R + [002] 10987: 2:S <idle>-0 [002] 4154503800.848884: 0:140:R ==> [002] 10987: 2:R cyclictest-10987 [002] 4154503800.848886: 10987: 2:S ==> [002] 0:140:R <idle>-0 [002] 4154503800.849031: 0:140:R + [002] 10987: 2:S <idle>-0 [002] 4154503800.849033: 0:140:R ==> [002] 10987: 2:R cyclictest-10987 [002] 4154503800.849035: 10987: 2:S ==> [002] 0:140:R <idle>-0 [002] 4154503800.849181: 0:140:R + [002] 10987: 2:S <idle>-0 [002] 4154503800.849182: 0:140:R ==> [002] 10987: 2:R cyclictest-10987 [002] 4154503800.849185: 10987: 2:S ==> [002] 0:140:R <idle>-0 [002] 4154503800.849331: 0:140:R + [002] 10987: 2:S <idle>-0 [002] 4154503800.849332: 0:140:R ==> [002] 10987: 2:R cyclictest-10987 [002] 4154503800.849335: 10987: 2:S ==> [002] 0:140:R <idle>-0 [002] 4154503800.849480: 0:140:R + [002] 10987: 2:S <idle>-0 [002] 4154503800.849481: 0:140:R ==> [002] 10987: 2:R cyclictest-10987 [002] 4154503800.849484: 10987: 2:S ==> [002] 0:140:R <idle>-0 [002] 4154503800.849630: 0:140:R + [002] 10987: 2:S <idle>-0 [002] 4154503800.849631: 0:140:R ==> [002] 10987: 2:R cyclictest-10987 [002] 4154503800.849634: 10987: 2:S ==> [002] 0:140:R <idle>-0 [002] 4154503800.849781: 0:140:R + [002] 10987: 2:S <idle>-0 [002] 4154503800.849782: 0:140:R ==> [002] 10987: 2:R cyclictest-10987 [002] 4154503800.849785: 10987: 2:S ==> [002] 0:140:R <idle>-0 [002] 4154503800.849930: 0:140:R + [002] 10987: 2:S <idle>-0 [002] 4154503800.849931: 0:140:R ==> [002] 10987: 2:R cyclictest-10987 [002] 4154503800.849934: 10987: 2:S ==> [002] 0:140:R <idle>-0 [002] 4154503800.850079: 0:140:R + [002] 10987: 2:S <idle>-0 [002] 4154503800.850081: 0:140:R ==> [002] 10987: 2:R cyclictest-10987 [002] 4154503800.850083: 10987: 2:S ==> [002] 0:140:R <idle>-0 [002] 4154503800.850229: 0:140:R + [002] 10987: 2:S <idle>-0 [002] 4154503800.850231: 0:140:R ==> [002] 10987: 2:R cyclictest-10987 [002] 4154503800.850233: 10987: 2:S ==> [002] 0:140:R <idle>-0 [002] 4154503800.850379: 0:140:R + [002] 10987: 2:S <idle>-0 [002] 4154503800.850381: 0:140:R ==> [002] 10987: 2:R cyclictest-10987 [002] 4154503800.850383: 10987: 2:S ==> [002] 0:140:R <idle>-0 [002] 4154503800.850528: 0:140:R + [002] 10987: 2:S <idle>-0 [002] 4154503800.850530: 0:140:R ==> [002] 10987: 2:R cyclictest-10987 [002] 4154503800.850532: 10987: 2:S ==> [002] 0:140:R <idle>-0 [002] 4154503800.850678: 0:140:R + [002] 10987: 2:S <idle>-0 [002] 4154503800.850680: 0:140:R ==> [002] 10987: 2:R cyclictest-10987 [002] 4154503800.850682: 10987: 2:S ==> [002] 0:140:R <idle>-0 [002] 4154503800.850828: 0:140:R + [002] 10987: 2:S <idle>-0 [002] 4154503800.850830: 0:140:R ==> [002] 10987: 2:R cyclictest-10987 [002] 4154503800.850833: 10987: 2:S ==> [002] 0:140:R <idle>-0 [002] 4154503800.850978: 0:140:R + [002] 10987: 2:S <idle>-0 [002] 4154503800.850980: 0:140:R ==> [002] 10987: 2:R cyclictest-10987 [002] 4154503800.850982: 10987: 2:S ==> [002] 0:140:R <idle>-0 [002] 4154503800.851128: 0:140:R + [002] 10987: 2:S <idle>-0 [002] 4154503800.851129: 0:140:R ==> [002] 10987: 2:R
Attachment:
trace.vcd
Description: application/cdlink