lkml.org 
[lkml]   [2012]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v5 5/5] perf script: Add event_analyzing_sample.py as a sample for general event handling
Date
Hi,

On Thu, 9 Aug 2012 12:30:07 +0800, Feng Tang wrote:
> Hi Namhyung,
>
> Many thanks for your valuable comments, I'll fold the fixes into an
> incremental patch.
>
> On Thu, 9 Aug 2012 10:30:34 +0900
> Namhyung Kim <namhyung@kernel.org> wrote:
>
>> On Wed, 8 Aug 2012 17:57:55 +0800, Feng Tang wrote:
>> > Currently only trace point events are supported in perf/python script,
>> > the first 3 patches of this serie add the support for all types of
>>
>
>> > +con = sqlite3.connect("/dev/shm/perf.db")
>> > +con.isolation_level = None
>> > +
>> > +def trace_begin():
>> > + print "In trace_begin:\n"
>>
>> It seems it's not aligned with other statements, and even not needed at
>> all. Does it work?
>
> trace_begin() is a must have for a python script, the <print "In trace_begin:\n">
> is automatically generated from "perf script -g", I guess its intension is
> to help developer debug their own patches. and same for the trace_end().
>
I meant the print statement not trace_begin function :)

Btw, by any chance do you plan to add support to callchains? I think
it's very nice to have.

Thanks,
Namhyung


>> > +def print_header(event_name, cpu, secs, nsecs, pid, comm):
>> > + print "%-20s %5u %05u.%09u %8u %-20s " % \
>> > + (event_name, cpu, secs, nsecs, pid, comm),
>>
>> It seems this function was not called anywhere.
>
> It is auto-generated too, and you are right, it is not needed at all,
> will remove it.
>
> Thanks,
> Feng


\
 
 \ /
  Last update: 2012-08-09 08:05    [W:0.043 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site