Prev: [PATCH] dynamic_debug: allow to set dynamic debug flags right at module load time
Next: [PATCH] writeback: fix non-integrity write-back
From: Avi Kivity on 6 Jun 2010 04:10 On 06/04/2010 12:57 AM, Steven Rostedt wrote: > On Tue, 2010-06-01 at 15:39 +0300, Avi Kivity wrote: > >> On 06/01/2010 02:59 PM, Steven Rostedt wrote: >> > >> I meant that viewing would be slowed down. It's an important part of >> using ftrace! >> >> How long does the Python formatter take to process 100k or 1M events? >> >> > I finally got around to testing this. > > I ran a trace on lock_acquire, and traced 1,253,296 events. > > I then created a python plugin to analyze the trace: > > ---- > def lock_acquire(trace_seq, event): > t = '' > r = '' > if int(event['flags'])& 1: > t = 'try' > if int(event['flags'])& 2: > r = 'read' > trace_seq.puts('t %x %s%s%s' % ( > event['lockdep_addr'], t, r, > event['name'])) > > def register(pevent): > pevent.register_event_handler("lock", "lock_acquire", lock_acquire) > ---- > > Disclaimer, I'm not a python expert, and I'm sure the above python code > sucks. > I think Python more or less guarantees your code will suck no matter what you do. > [root(a)ixf9 trace-cmd.git]# time ./trace-cmd report -N>/dev/null 2>&1 > > real 0m4.653s > user 0m4.234s > sys 0m0.419s > > * -N keeps trace-cmd from loading any plugins. > > > [root(a)ixf9 trace-cmd.git]# time PYTHONPATH=`pwd` ./trace-cmd report>/dev/null 2>&1 > > real 0m53.916s > user 0m53.047s > sys 0m0.859s > > > Yes, running a python interpreter is a bit more expensive. It took 4 > seconds to read the million events with plain C, but 53 seconds to read > it in python. > > That said... This would only affect you if you were writing this to a > file. I doubt that you would notice this if you were scanning the trace > with less. > I'm more worried about searching with less. But a minute for a million events isn't that bad. > Also, I kicked this off in kernelshark, and it made no difference that I > can see. This is because kernelshark only evaluates the viewable area of > the screen. > Neat. Can it also search? Where can I find it? <googles, finds, gawks> -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Steven Rostedt on 6 Jun 2010 11:10 On Sun, 2010-06-06 at 11:08 +0300, Avi Kivity wrote: > > Also, I kicked this off in kernelshark, and it made no difference that I > > can see. This is because kernelshark only evaluates the viewable area of > > the screen. > > > > Neat. Can it also search? Where can I find it? <googles, finds, gawks> > It's in the same repo as trace-cmd: git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git I'm still working on it. The latest is in the branch kernelshark-devel. And yes, it does searches. -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Avi Kivity on 6 Jun 2010 12:30
On 06/06/2010 06:02 PM, Steven Rostedt wrote: > On Sun, 2010-06-06 at 11:08 +0300, Avi Kivity wrote: > > >>> Also, I kicked this off in kernelshark, and it made no difference that I >>> can see. This is because kernelshark only evaluates the viewable area of >>> the screen. >>> >>> >> Neat. Can it also search? Where can I find it?<googles, finds, gawks> >> >> > It's in the same repo as trace-cmd: > > git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git > > I'm still working on it. The latest is in the branch kernelshark-devel. > > And yes, it does searches. > I'll be tracking it. In case you're interested in wishlists, my #1 would be to be able to initiate traces from the GUI (so it's easy to explore the available trace events and enable them interactively). -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |