1. 11 8月, 2018 1 次提交
  2. 02 11月, 2017 1 次提交
    • G
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman 提交于
      Many source files in the tree are missing licensing information, which
      makes it harder for compliance tools to determine the correct license.
      
      By default all files without license information are under the default
      license of the kernel, which is GPL version 2.
      
      Update the files which contain no license information with the 'GPL-2.0'
      SPDX license identifier.  The SPDX identifier is a legally binding
      shorthand, which can be used instead of the full boiler plate text.
      
      This patch is based on work done by Thomas Gleixner and Kate Stewart and
      Philippe Ombredanne.
      
      How this work was done:
      
      Patches were generated and checked against linux-4.14-rc6 for a subset of
      the use cases:
       - file had no licensing information it it.
       - file was a */uapi/* one with no licensing information in it,
       - file was a */uapi/* one with existing licensing information,
      
      Further patches will be generated in subsequent months to fix up cases
      where non-standard license headers were used, and references to license
      had to be inferred by heuristics based on keywords.
      
      The analysis to determine which SPDX License Identifier to be applied to
      a file was done in a spreadsheet of side by side results from of the
      output of two independent scanners (ScanCode & Windriver) producing SPDX
      tag:value files created by Philippe Ombredanne.  Philippe prepared the
      base worksheet, and did an initial spot review of a few 1000 files.
      
      The 4.13 kernel was the starting point of the analysis with 60,537 files
      assessed.  Kate Stewart did a file by file comparison of the scanner
      results in the spreadsheet to determine which SPDX license identifier(s)
      to be applied to the file. She confirmed any determination that was not
      immediately clear with lawyers working with the Linux Foundation.
      
      Criteria used to select files for SPDX license identifier tagging was:
       - Files considered eligible had to be source code files.
       - Make and config files were included as candidates if they contained >5
         lines of source
       - File already had some variant of a license header in it (even if <5
         lines).
      
      All documentation files were explicitly excluded.
      
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
      
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
      
         For non */uapi/* files that summary was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0                                              11139
      
         and resulted in the first patch in this series.
      
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0 WITH Linux-syscall-note                        930
      
         and resulted in the second patch in this series.
      
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|------
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
      
         and that resulted in the third patch in this series.
      
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
      
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
      
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
      
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
      
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: NPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  3. 26 1月, 2017 1 次提交
  4. 13 7月, 2016 1 次提交
  5. 07 1月, 2016 1 次提交
  6. 29 9月, 2015 1 次提交
  7. 29 7月, 2015 1 次提交
    • A
      perf python: Remove dependency on 'machine' methods · 959c2199
      Arnaldo Carvalho de Melo 提交于
      The python binding still doesn't provide symbol resolving facilities,
      but the recent addition of the trace_event__register_resolver() function
      made it add as a dependency the machine__resolve_kernel_addr() method,
      that in turn drags all the symbol resolving code.
      
      The problem:
      
        [root@zoo ~]# perf test -v python
        17: Try 'import perf' in python, checking link problems      :
        --- start ---
        test child forked, pid 6853
        Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
        ImportError: /tmp/build/perf/python/perf.so: undefined symbol: machine__resolve_kernel_addr
        test child finished with -1
        ---- end ----
        Try 'import perf' in python, checking link problems: FAILED!
        [root@zoo ~]#
      
      Fix it by requiring this function to receive the resolver as a
      parameter, just like pevent_register_function_resolver(), i.e. do
      not explicitely refer to an object file not included in
      tools/perf/util/python-ext-sources.
      
        [root@zoo ~]# perf test python
        17: Try 'import perf' in python, checking link problems      : Ok
        [root@zoo ~]#
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Fixes: c3168b0d ("perf symbols: Provide libtraceevent callback to resolve kernel symbols")
      Link: http://lkml.kernel.org/n/tip-vxlhh95v2em9zdbgj3jm7xi5@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      959c2199
  8. 24 7月, 2015 1 次提交
  9. 03 4月, 2015 1 次提交
  10. 06 2月, 2015 1 次提交
  11. 23 8月, 2014 1 次提交
  12. 20 12月, 2013 1 次提交
    • A
      perf symbols: Add 'machine' member to struct addr_location · cc22e575
      Arnaldo Carvalho de Melo 提交于
      The addr_location struct should fully qualify an address, and to do that
      it should have in it the machine where the thread was found.
      
      Thus all functions that receive an addr_location now don't need to also
      receive a 'machine', those functions just need to access al->machine
      instead, just like it does with the other parts of an address location:
      al->thread, al->map, etc.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-o51iiee7vyq4r3k362uvuylg@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      cc22e575
  13. 05 12月, 2013 2 次提交
  14. 09 10月, 2013 1 次提交
  15. 22 7月, 2013 1 次提交
  16. 13 7月, 2013 4 次提交
  17. 22 3月, 2013 1 次提交
  18. 16 3月, 2013 1 次提交
  19. 12 8月, 2012 1 次提交
    • J
      perf tools: Support for DWARF CFI unwinding on post processing · 71ad0f5e
      Jiri Olsa 提交于
      This brings the support for DWARF cfi unwinding on perf post
      processing. Call frame informations are retrieved and then passed
      to libunwind that requests memory and register content from the
      applications.
      
      Adding unwind object to handle the user stack backtrace based
      on the user register values and user stack dump.
      
      The unwind object access the libunwind via remote interface
      and provides to it all the necessary data to unwind the stack.
      
      The unwind interface provides following function:
      	unwind__get_entries
      
      And callback (specified in above function) to retrieve
      the backtrace entries:
      	typedef int (*unwind_entry_cb_t)(struct unwind_entry *entry,
      					 void *arg);
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Original-patch-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: "Frank Ch. Eigler" <fche@redhat.com>
      Cc: Arun Sharma <asharma@fb.com>
      Cc: Benjamin Redelings <benjamin.redelings@nescent.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Cyrill Gorcunov <gorcunov@openvz.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: Ulrich Drepper <drepper@gmail.com>
      Link: http://lkml.kernel.org/r/1344345647-11536-12-git-send-email-jolsa@redhat.com
      [ Replaced use of perf_session by usage of perf_evsel ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      71ad0f5e
  20. 08 8月, 2012 3 次提交
  21. 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
  22. 25 4月, 2012 3 次提交
    • S
      parse-events: Rename struct record to struct pevent_record · 1c698186
      Steven Rostedt 提交于
      As libtraceevent will be a library, having struct record is far
      too generic of a name to use. Renaming it to be consistent with the
      rest of the functions will be a better long term solution.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Arun Sharma <asharma@fb.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      1c698186
    • S
      perf: Have perf use the new libtraceevent.a library · aaf045f7
      Steven Rostedt 提交于
      The event parsing code in perf was originally copied from trace-cmd
      but never was kept up-to-date with the changes that was done there.
      The trace-cmd libtraceevent.a code is much more mature than what is
      currently in perf.
      
      This updates the code to use wrappers to handle the calls to the
      new event parsing code. The new code requires a handle to be pass
      around, which removes the global event variables and allows
      more than one event structure to be read from different files
      (and different machines).
      
      But perf still has the old global events and the code throughout
      perf does not yet have a nice way to pass around a handle.
      A global 'pevent' has been made for perf and the old calls have
      been created as wrappers to the new event parsing code that uses
      the global pevent.
      
      With this change, perf can later incorporate the pevent handle into
      the perf structures and allow more than one file to be read and
      compared, that contains different events.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Arun Sharma <asharma@fb.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      aaf045f7
    • S
      perf: Separate out trace-cmd parse-events from perf files · 4ace73ee
      Steven Rostedt 提交于
      Move the trace-event-parse.c code that originally came from trace-cmd into
      their own files. The new file will be called trace-parse-events.c, as
      the name of trace-cmd's file was parse-events.c too, but it conflicted
      with the parse-events.c file in perf that parses the command line.
      
      This tries to update the code with mimimal changes.
      
      Perf specific code stays in the trace-event-parse.[ch] files and
      the common parsing code is now in trace-parse-events.c and
      trace-parse-events.h.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Arun Sharma <asharma@fb.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      4ace73ee
  23. 28 11月, 2011 1 次提交
  24. 20 10月, 2011 1 次提交
    • J
      perf tools: Fix tracing info recording · 29208e57
      Jiri Olsa 提交于
      Fixing the way the tracing information is stored within record command.
      The current implementation is causing issues for pipe output.
      
      Following commands fail currently:
      	perf script syscall-counts ls
      	perf record -e syscalls:sys_exit_read ls | ./perf report -i -
      
      The tracing information is part of the perf data file. It contains
      several files from within the tracing debugfs and procs directories.
      
      Beside some static header files, for each tracing event the format
      file is added. The /proc/kallsyms file is also added.
      
      The tracing data are stored with preceeding size. This is causing some
      dificulties for pipe output, since there's no way to tell debugfs/proc
      file size before reading it. So, for pipe output, all the debugfs files
      were read twice. Once to get the overall size and once to store the
      content itself. This can cause problem in case any of these file
      changed, within the storage time.
      
      To fix this behaviour and ensure the integrity of the tracing data, we:
          - read debugfs/proc file into the temp file
          - get temp file size and dump it to the pipe
          - dump the temp file contents to the pipe
      
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Neil Horman <nhorman@tuxdriver.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/20111020135943.GD2092@jolsa.brq.redhat.comSigned-off-by: NJiri Olsa <jolsa@redhat.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      29208e57
  25. 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
  26. 15 3月, 2011 2 次提交
  27. 04 1月, 2011 1 次提交
    • A
      perf tools: Introduce event selectors · 69aad6f1
      Arnaldo Carvalho de Melo 提交于
      Out of ad-hoc code and global arrays with hard coded sizes.
      
      This is the first step on having a library that will be first
      used on regression tests in the 'perf test' tool.
      
      [acme@felicio linux]$ size /tmp/perf.before
         text	   data	    bss	    dec	    hex	filename
      1273776	  97384	5104416	6475576	 62cf38	/tmp/perf.before
      [acme@felicio linux]$ size /tmp/perf.new
         text	   data	    bss	    dec	    hex	filename
      1275422	  97416	1392416	2765254	 2a31c6	/tmp/perf.new
      
      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>
      69aad6f1
  28. 20 5月, 2010 1 次提交
    • F
      perf: Fix unaligned accesses while fetching trace values · 85cb68b2
      Frederic Weisbecker 提交于
      Accessing trace values of an 8 size may end up in a segfault
      on archs that can't deal with misaligned access, which is the
      case for sparc 64. This is because PERF_SAMPLE_RAW are aligned
      to 4 and not to 8.
      
      Fix this on the macros that get the values of 8 size.
      
      This fixes segfaults on perf tools in sparc 64.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: Masami Hiramatsu <mhiramat@redhat.com>
      Cc: David Miller <davem@davemloft.net>
      85cb68b2
  29. 03 5月, 2010 1 次提交
    • T
      perf: add perf-inject builtin · 454c407e
      Tom Zanussi 提交于
      Currently, perf 'live mode' writes build-ids at the end of the
      session, which isn't actually useful for processing live mode events.
      
      What would be better would be to have the build-ids sent before any of
      the samples that reference them, which can be done by processing the
      event stream and retrieving the build-ids on the first hit.  Doing
      that in perf-record itself, however, is off-limits.
      
      This patch introduces perf-inject, which does the same job while
      leaving perf-record untouched.  Normal mode perf still records the
      build-ids at the end of the session as it should, but for live mode,
      perf-inject can be injected in between the record and report steps
      e.g.:
      
      perf record -o - ./hackbench 10 | perf inject -v -b | perf report -v -i -
      
      perf-inject reads a perf-record event stream and repipes it to stdout.
      At any point the processing code can inject other events into the
      event stream - in this case build-ids (-b option) are read and
      injected as needed into the event stream.
      
      Build-ids are just the first user of perf-inject - potentially
      anything that needs userspace processing to augment the trace stream
      with additional information could make use of this facility.
      
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1272696080-16435-3-git-send-email-tzanussi@gmail.com>
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      454c407e
  30. 01 5月, 2010 1 次提交
    • F
      perf: Fix warning while reading ring buffer headers · d00a47cc
      Frederic Weisbecker 提交于
      commit e9e94e3b
      "perf trace: Ignore "overwrite" field if present in
      /events/header_page" makes perf trace launching spurious warnings
      about unexpected tokens read:
      
      	Warning: Error: expected type 6 but read 4
      
      This change tries to handle the overcommit field in the header_page
      file whenever this field is present or not.
      
      The problem is that if this field is not present, we try to find it
      and give up in the middle of the line when we realize we are actually
      dealing with another field, which is the "data" one. And this failure
      abandons the file pointer in the middle of the "data" description
      line:
      
      	field: u64 timestamp;	offset:0;	size:8;	signed:0;
      	field: local_t commit;	offset:8;	size:8;	signed:1;
      	field: char data;	offset:16;	size:4080;	signed:1;
                            ^^^
                            Here
      
      What happens next is that we want to read this line to parse the data
      field, but we fail because the pointer is not in the beginning of the
      line.
      
      We could probably fix that by rewinding the pointer. But in fact we
      don't care much about these headers that only concern the ftrace
      ring-buffer. We don't use them from perf.
      
      Just skip this part of perf.data, but don't remove it from recording
      to stay compatible with olders perf.data
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      d00a47cc
  31. 14 4月, 2010 1 次提交
    • T
      perf: Convert perf tracing data into a tracing_data event · 9215545e
      Tom Zanussi 提交于
      Bypasses the tracing_data perf header code and replaces it with
      a synthesized event and processing function that accomplishes
      the same thing, used when reading/writing perf data to/from a
      pipe.
      
      The tracing data is pretty large, and this patch doesn't attempt
      to break it down into component events.  The tracing_data event
      itself doesn't actually contain the tracing data, rather it
      arranges for the event processing code to skip over it after
      it's read, using the skip return value added to the event
      processing loop in a previous patch.
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: fweisbec@gmail.com
      Cc: rostedt@goodmis.org
      Cc: k-keiichi@bx.jp.nec.com
      Cc: acme@ghostprotocols.net
      LKML-Reference: <1270184365-8281-8-git-send-email-tzanussi@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      9215545e