1. 17 7月, 2014 1 次提交
  2. 08 6月, 2014 1 次提交
  3. 27 12月, 2013 1 次提交
  4. 20 12月, 2013 2 次提交
  5. 04 11月, 2013 1 次提交
  6. 18 10月, 2013 1 次提交
  7. 15 10月, 2013 1 次提交
  8. 22 7月, 2013 1 次提交
  9. 25 1月, 2013 1 次提交
  10. 20 9月, 2012 1 次提交
  11. 11 9月, 2012 1 次提交
    • I
      perf tools: Use __maybe_used for unused variables · 1d037ca1
      Irina Tirdea 提交于
      perf defines both __used and __unused variables to use for marking
      unused variables. The variable __used is defined to
      __attribute__((__unused__)), which contradicts the kernel definition to
      __attribute__((__used__)) for new gcc versions. On Android, __used is
      also defined in system headers and this leads to warnings like: warning:
      '__used__' attribute ignored
      
      __unused is not defined in the kernel and is not a standard definition.
      If __unused is included everywhere instead of __used, this leads to
      conflicts with glibc headers, since glibc has a variables with this name
      in its headers.
      
      The best approach is to use __maybe_unused, the definition used in the
      kernel for __attribute__((unused)). In this way there is only one
      definition in perf sources (instead of 2 definitions that point to the
      same thing: __used and __unused) and it works on both Linux and Android.
      This patch simply replaces all instances of __used and __unused with
      __maybe_unused.
      Signed-off-by: NIrina Tirdea <irina.tirdea@intel.com>
      Acked-by: NPekka Enberg <penberg@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/1347315303-29906-7-git-send-email-irina.tirdea@intel.com
      [ committer note: fixed up conflict with a116e05d in builtin-sched.c ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1d037ca1
  12. 06 9月, 2012 1 次提交
  13. 08 8月, 2012 3 次提交
  14. 30 6月, 2012 1 次提交
  15. 28 6月, 2012 1 次提交
    • A
      perf tools: Stop using a global trace events description list · da378962
      Arnaldo Carvalho de Melo 提交于
      The pevent thing is per perf.data file, so I made it stop being static
      and become a perf_session member, so tools processing perf.data files
      use perf_session and _there_ we read the trace events description into
      session->pevent and then change everywhere to stop using that single
      global pevent variable and use the per session one.
      
      Note that it _doesn't_ fall backs to trace__event_id, as we're not
      interested at all in what is present in the
      /sys/kernel/debug/tracing/events in the workstation doing the analysis,
      just in what is in the perf.data file.
      
      This patch also introduces perf_session__set_tracepoints_handlers that
      is the perf perf.data/session way to associate handlers to tracepoint
      events by resolving their IDs using the events descriptions stored in a
      perf.data file. Make 'perf sched' use it.
      Reported-by: NDmitry Antipov <dmitry.antipov@linaro.org>
      Tested-by: NDmitry Antipov <dmitry.antipov@linaro.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: linaro-dev@lists.linaro.org
      Cc: patches@linaro.org
      Link: http://lkml.kernel.org/r/20120625232016.GA28525@infradead.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      da378962
  16. 22 5月, 2012 2 次提交
    • F
      perf script: Rename struct event to struct event_format in perl engine · 8784eb74
      Frederic Weisbecker 提交于
      While migrating to the libtraceevent, the perl scripting engine
      missed this structure rename.
      
      This fixes:
      
           util/scripting-engines/trace-event-perl.c: In function "find_cache_event":
           util/scripting-engines/trace-event-perl.c:244: error: assignment from incompatible pointer type
           util/scripting-engines/trace-event-perl.c:248: error: dereferencing pointer to incomplete type
           util/scripting-engines/trace-event-perl.c:248: error: dereferencing pointer to incomplete type
           util/scripting-engines/trace-event-perl.c:250: error: dereferencing pointer to incomplete type
           util/scripting-engines/trace-event-perl.c: In function "perl_process_tracepoint":
           util/scripting-engines/trace-event-perl.c:286: error: dereferencing pointer to incomplete type
           util/scripting-engines/trace-event-perl.c:286: error: dereferencing pointer to incomplete type
           util/scripting-engines/trace-event-perl.c:307: error: dereferencing pointer to incomplete type
           util/scripting-engines/trace-event-perl.c: In function "perl_generate_script":
           util/scripting-engines/trace-event-perl.c:498: error: passing argument 1 of "trace_find_next_event" from incompatible pointer type
           util/scripting-engines/../trace-event.h:56: note: expected "struct event_format *" but argument is of type "struct event *"
           util/scripting-engines/trace-event-perl.c:498: error: assignment from incompatible pointer type
           util/scripting-engines/trace-event-perl.c:499: error: dereferencing pointer to incomplete type
           util/scripting-engines/trace-event-perl.c:499: error: dereferencing pointer to incomplete type
           util/scripting-engines/trace-event-perl.c:513: error: dereferencing pointer to incomplete type
           util/scripting-engines/trace-event-perl.c:532: error: dereferencing pointer to incomplete type
           util/scripting-engines/trace-event-perl.c:556: error: dereferencing pointer to incomplete type
           util/scripting-engines/trace-event-perl.c:569: error: dereferencing pointer to incomplete type
           util/scripting-engines/trace-event-perl.c:570: error: dereferencing pointer to incomplete type
           util/scripting-engines/trace-event-perl.c:579: error: dereferencing pointer to incomplete type
           util/scripting-engines/trace-event-perl.c:580: error: dereferencing pointer to incomplete type
      Reported-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NFrederic Weisbecker <fweisbec@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@redhat.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Link: http://lkml.kernel.org/r/1337697049-30251-2-git-send-email-fweisbec@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      8784eb74
    • F
      perf script: Explicitly handle known default print arg type · e326e752
      Frederic Weisbecker 提交于
      Handle the print argument types brought by the new libparsevent in perl
      scripting engine.
      
      PRINT_BSTRING and PRINT_DYNAMIC_ARRAY are treated just like strings
      and thus don't require specific processing.
      
      But PRINT_FUNC need specific plugins which are not yet handled, lets
      warn if we meet this case.
      
      This fixes:
      
           util/scripting-engines/trace-event-perl.c: In function define_event_symbol:
           util/scripting-engines/trace-event-perl.c:188: error: enumeration value PRINT_BSTRING not handled in switch
           util/scripting-engines/trace-event-perl.c:188: error: enumeration value PRINT_DYNAMIC_ARRAY not handled in switch
           util/scripting-engines/trace-event-perl.c:188: error: enumeration value PRINT_FUNC not handled in switch
      Reported-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NFrederic Weisbecker <fweisbec@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@redhat.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Link: http://lkml.kernel.org/r/1337697049-30251-1-git-send-email-fweisbec@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e326e752
  17. 24 12月, 2011 1 次提交
    • R
      perf script: Add generic perl handler to process events · 37a058ea
      Robert Richter 提交于
      The current perf scripting facility only supports tracepoints. This
      patch implements a generic perl handler to support other events than
      tracepoints too.
      
      This patch introduces a function process_event() that is called by perf
      for each sample. The function is called with byte streams as arguments
      containing information about the event, its attributes, the sample and
      raw data. Perl's unpack() function can easily be used for byte decoding.
      The following is the default implementation for process_event() that can
      also be generated with perf script:
      
       # Packed byte string args of process_event():
       #
       # $event:       union perf_event        util/event.h
       # $attr:        struct perf_event_attr  linux/perf_event.h
       # $sample:      struct perf_sample      util/event.h
       # $raw_data:    perf_sample->raw_data   util/event.h
      
       sub process_event
       {
               my ($event, $attr, $sample, $raw_data) = @_;
      
               my @event       = unpack("LSS", $event);
               my @attr        = unpack("LLQQQQQLLQQ", $attr);
               my @sample      = unpack("QLLQQQQQLL", $sample);
               my @raw_data    = unpack("C*", $raw_data);
      
               use Data::Dumper;
               print Dumper \@event, \@attr, \@sample, \@raw_data;
       }
      
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1323969824-9711-4-git-send-email-robert.richter@amd.comSigned-off-by: NRobert Richter <robert.richter@amd.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      37a058ea
  18. 28 11月, 2011 1 次提交
  19. 24 3月, 2011 1 次提交
    • A
      perf session: Pass evsel in event_ops->sample() · 9e69c210
      Arnaldo Carvalho de Melo 提交于
      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 <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      9e69c210
  20. 15 3月, 2011 1 次提交
  21. 17 11月, 2010 1 次提交
  22. 11 5月, 2010 1 次提交
  23. 24 2月, 2010 2 次提交
  24. 15 12月, 2009 2 次提交
  25. 07 12月, 2009 2 次提交
  26. 30 11月, 2009 2 次提交
  27. 28 11月, 2009 2 次提交
    • T
      perf trace: Add interface to access perf data from Perl handlers · d1b93772
      Tom Zanussi 提交于
      The Perl scripting support for perf trace allows most of a trace
      event's data to be accessed directly as handler arguments, but
      not all of it e.g. the less common fields aren't passed in.  To
      give scripts access to the other fields and/or any other data or
      metadata in the main perf executable that might be useful, a way
      to access the C data in perf from Perl is needed; this patch
      uses the Perl XS facility to do it for the common_xxx event
      fields not passed to handler functions.
      
      Context.pm exports three functions to Perl scripts that access
      fields for the current event by calling back into perf:
      common_pc(), common_flags() and common_lock_depth().  Support
      for common_flags() field values was added to Core.pm and a
      script used to sanity check these and other basic scripting
      features, check-perf-trace.pl, was also added.
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Cc: fweisbec@gmail.com
      Cc: rostedt@goodmis.org
      Cc: anton@samba.org
      Cc: hch@infradead.org
      LKML-Reference: <1259133352-23685-6-git-send-email-tzanussi@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d1b93772
    • T
      perf trace: Add Perl scripting support · 16c632de
      Tom Zanussi 提交于
      Implement trace_scripting_ops to make Perl a supported perf
      trace scripting language.
      
      Additionally adds code that allows Perl trace scripts to access
      the 'flag' and 'symbolic' (__print_flags(), __print_symbolic())
      field information parsed from the trace format files.
      
      Also adds the Perl implementation of the generate_script()
      trace_scripting_op, which creates a ready-to-run perf trace Perl
      script based on existing trace data.  Scripts generated by this
      implementation print out all the fields for each event mentioned
      in perf.data (and will detect and generate the proper scripting
      code for 'flag' and 'symbolic' fields), and will additionally
      generate handlers for the special 'trace_unhandled',
      'trace_begin' and 'trace_end' handlers.  Script authors can
      simply remove the printing code to implement their own custom
      event handling.
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Cc: fweisbec@gmail.com
      Cc: rostedt@goodmis.org
      Cc: anton@samba.org
      Cc: hch@infradead.org
      LKML-Reference: <1259133352-23685-4-git-send-email-tzanussi@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      16c632de