aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/scripting-engines
AgeCommit message (Collapse)AuthorFilesLines
2011-03-23perf session: Pass evsel in event_ops->sample()Arnaldo Carvalho de Melo2-0/+2
Resolving the sample->id to an evsel since the most advanced tools, report and annotate, and the others will too when they evolve to properly support multi-event perf.data files. Good also because it does an extra validation, checking that the ID is valid when present. When that is not the case, the overhead is just a branch + function call (perf_evlist__id2evsel). Cc: Frederic Weisbecker <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Cc: Tom Zanussi <[email protected]> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2011-03-14perf script: Change process_event prototypeDavid Ahern2-6/+16
Prepare for handling of samples for any event type. Acked-by: Frederic Weisbecker <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: David Ahern <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2011-02-07perf tool: Fix gcc 4.6.0 issuesKyle McMartin1-2/+1
GCC 4.6.0 in Fedora rawhide turned up some compile errors in tools/perf due to the -Werror=unused-but-set-variable flag. I've gone through and annotated some of the assignments that had side effects (ie: return value from a function) with the __used annotation, and in some cases, just removed unused code. In a few cases, we were assigning something useful, but not using it in later parts of the function. kyle@dreadnought:~/src% gcc --version gcc (GCC) 4.6.0 20110122 (Red Hat 4.6.0-0.3) Cc: Ingo Molnar <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Kyle McMartin <[email protected]> [ committer note: Fixed up the annotation fixes, as that code moved recently ] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2010-11-16perf: Rename 'perf trace' to 'perf script'Ingo Molnar2-5/+5
Free the perf trace name space and rename the trace to 'script' which is a better match for the scripting engine. Signed-off-by: Ingo Molnar <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
2010-06-01perf scripts python: Give field dict to unhandled callbackPierre Tardy1-16/+34
trace_unhandled() callback does not allow to access event fields, this patch resolves the problem. It can also been used as a more pythonic and flexible way for script writters to demux event types This will for example greatly simplify pytimechart event demux. Acked-by: Frederic Weisbecker <[email protected]> Acked-by: Tom Zanussi <[email protected]> Cc: Ingo Molnar <[email protected]>, Cc: Frederic Weisbecker <[email protected]> Cc: Tom Zanussi <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Pierre Tardy <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2010-05-10perf/trace/scripting: don't show script start/stop messages by defaultTom Zanussi2-7/+0
Only print the script start/stop messages in verbose mode - users normally don't care and it just clutters up the output. Cc: Frédéric Weisbecker <[email protected]> Cc: Ingo Molnar <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Tom Zanussi <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2010-04-02perf/scripts: Tuple was set from long in both branches in python_process_event()Tom Zanussi1-5/+12
This is a fix to the signed/unsigned field handling in the Python scripting engine, based on a patch from Roel Kluin. Basically, Python wants to use a PyInt (which is internally a long) if it can i.e. if the value will fit into that type. If not, it stores it into a PyLong, which isn't actually a long, but an arbitrary-precision integer variable. The code below is similar to to what Python does internally, and it seems to work as expected on the x86 and x86_64 sytems I tested it on. Signed-off-by: Tom Zanussi <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Roel Kluin <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: [email protected] LKML-Reference: <1270184305.6422.10.camel@tropicana> Signed-off-by: Ingo Molnar <[email protected]>
2010-02-25perf/scripts: Remove unnecessary PyTuple resizesTom Zanussi1-8/+5
If we know the size of a tuple in advance, there's no need to resize it - start out with the known size in the first place. Signed-off-by: Tom Zanussi <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Keiichi KII <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> LKML-Reference: <1266822779.6426.4.camel@tropicana> Signed-off-by: Frederic Weisbecker <[email protected]>
2010-02-25perf/scripts: Add Python scripting engineTom Zanussi1-0/+576
Add base support for Python scripting to perf trace. Signed-off-by: Tom Zanussi <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Keiichi KII <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Frederic Weisbecker <[email protected]>
2010-02-23perf/scripts: Move Perl scripting files to scripting-engines dirTom Zanussi1-0/+568
Create a scripting-engines directory to contain scripting engine implementation code, in anticipation of the addition of new scripting support. Also removes trace-event-perl.h. Signed-off-by: Tom Zanussi <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Keiichi KII <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Frederic Weisbecker <[email protected]>