1. 25 Apr, 2012 12 commits
    • Steven Rostedt's avatar
      parse-events: Let pevent_free() take a NULL pointer · a2525a08
      Steven Rostedt authored
      The pevent_free() should ack like other free()s and allow a
      NULL pointer to be passed to it which makes error handling a bit
      easier for the users of pevent_free().
      Signed-off-by: default avatarSteven 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: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      a2525a08
    • Vaibhav Nagarnaik's avatar
      parse-events: Handle opcode parsing error · 14ffde0e
      Vaibhav Nagarnaik authored
      If an invalid opcode is encountered in parsing event print format, the
      trace-cmd calls exit() without parsing any other events.
      
      This patch adds handling for such an error where the get_op_prio() is
      called. If the return value is -1, then the event print format parsing
      is skipped and parsing continues.
      
      Cc: Michael Rubin <mrubin@google.com>
      Cc: David Sharp <dhsharp@google.com>
      Signed-off-by: default avatarVaibhav Nagarnaik <vnagarnaik@google.com>
      Link: http://lkml.kernel.org/r/1311619257-4970-1-git-send-email-vnagarnaik@google.comSigned-off-by: default avatarSteven 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: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      14ffde0e
    • Vaibhav Nagarnaik's avatar
      parse-events: Handle invalid opcode parsing gracefully · d69afed5
      Vaibhav Nagarnaik authored
      If an invalid opcode is encountered, trace-cmd exits with an error.
      Instead it can be treated as a soft error where the event's print format
      is not parsed and its binary data is dumped out.
      
      This patch adds a return value to arg_num_eval() function to indicate if
      the parsing was successful. If not, then the error is considered soft
      and the parsing of the offending event fails.
      
      Cc: Michael Rubin <mrubin@google.com>
      Cc: David Sharp <dhsharp@google.com>
      Signed-off-by: default avatarVaibhav Nagarnaik <vnagarnaik@google.com>
      Link: http://lkml.kernel.org/r/1310785241-3799-2-git-send-email-vnagarnaik@google.comSigned-off-by: default avatarSteven 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: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      d69afed5
    • Julia Lawall's avatar
      perf/events: Correct size given to memset · 54a36258
      Julia Lawall authored
      This is a forward port of commit 5660ce34
      perf tools: Correct size given to memset
      written by Julia Lawall and forward ported by Steven Rostedt.
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Signed-off-by: default avatarSteven 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: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      54a36258
    • Tom Zanussi's avatar
      perf/events: Add flag/symbol format_flags · 5205aec9
      Tom Zanussi authored
      This is a port of commit eb9a42ca
       perf trace: Add flag/symbolic format_flags
      of the old trace-event-parse.c to the new event-parse.c that
      was written by Tom Zanussi and forward ported by Steven Rostedt.
      Signed-off-by: default avatarTom Zanussi <tzanussi@gmail.com>
      Signed-off-by: default avatarSteven 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: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      5205aec9
    • Steven Rostedt's avatar
      perf/events: Add flag to produce nsec output · 4dc1024a
      Steven Rostedt authored
      libtraceevent library prints out in usecs but perf wants to print out
      in nsecs. Add a flag that lets the user decide to print out in usec
      or nsec times.
      Signed-off-by: default avatarSteven 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: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      4dc1024a
    • Steven Rostedt's avatar
      perf: Have perf use the new libtraceevent.a library · aaf045f7
      Steven Rostedt authored
      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: default avatarSteven 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: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      aaf045f7
    • Steven Rostedt's avatar
      events: Update tools/lib/traceevent to work with perf · 668fe01f
      Steven Rostedt authored
      Some of the util functions of libtraceevent.a conflict with perf,
      such as die(), warning() and others. Move them into event-util.h
      that is not included by the perf tools.
      
      Also, as perf compiles with 'bool' the filter_arg->bool needs to
      be renamed to filter_arg->boolean.
      Signed-off-by: default avatarSteven 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: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      668fe01f
    • Steven Rostedt's avatar
      perf: Build libtraceevent.a · d0e7b850
      Steven Rostedt authored
      Have building perf also build libtraceevent.a. Currently, perf does
      not use the code within libtraceevent.a, but it soon will.
      Signed-off-by: default avatarSteven 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: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      d0e7b850
    • Steven Rostedt's avatar
      tools/events: Add files to create libtraceevent.a · f7d82350
      Steven Rostedt authored
      Copy over the files from trace-cmd to the Linux tools directory
      such that applications like perf and latencytrace can use the
      more advanced parsing code.
      
      Because some of the file names of perf conflict with trace-cmd file
      names, the trace-cmd files have been renamed as follows:
      
       parse-events.c ==> event-parse.c
       parse-events.h ==> event-parse.h
       utils.h        ==> event-utils.h
      
      The files have been updated to handle the changes to the header files
      but other than that, they are identical to what was in the trace-cmd
      repository. The history of these files, including authorship is
      available at the git repo:
      
       git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git
      
      The Makefile was also copied over, but most of it was removed to
      focus on the parse-events code first. The parts of the Makefile for
      the plugins have also been removed, but will be added back when the
      plugin code is copied over as well. But that may be in its own
      separate directory.
      Signed-off-by: default avatarSteven 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: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      f7d82350
    • Steven Rostedt's avatar
      perf: Separate out trace-cmd parse-events from perf files · 4ace73ee
      Steven Rostedt authored
      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: default avatarSteven 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: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      4ace73ee
    • Ingo Molnar's avatar
      Merge tag 'v3.4-rc4' into perf/core · 3dbe927b
      Ingo Molnar authored
      Merge v3.4-rc4 - we were on -rc2 before.
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      3dbe927b
  2. 21 Apr, 2012 23 commits
  3. 20 Apr, 2012 5 commits
    • Linus Torvalds's avatar
      Merge tag 'for-torvalds-20120418' of... · 3b422e9c
      Linus Torvalds authored
      Merge tag 'for-torvalds-20120418' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
      
      Pull pinctrl fixes from Linus Walleij:
       - Fixed compilation errors and warnings
       - Stricter checks on the ops vtable
      
      * tag 'for-torvalds-20120418' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl: implement pinctrl_check_ops
        pinctrl: include <linux/bug.h> to prevent compile errors
        pinctrl: fix compile error if not select PINMUX support
      3b422e9c
    • Linus Torvalds's avatar
      Merge tag 'tty-3.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 3a537430
      Linus Torvalds authored
      Pull 3 tiny tty bugfixes from Greg Kroah-Hartman.
      
      * tag 'tty-3.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        drivers/tty/amiserial.c: add missing tty_unlock
        pch_uart: Fix dma channel unallocated issue
        ARM: clps711x: serial driver hungs are a result of call disable_irq within ISR
      3a537430
    • Linus Torvalds's avatar
      Merge tag 'usb-3.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 1cd653a6
      Linus Torvalds authored
      Pull USB fixes from Greg Kroah-Hartman:
       "Here are a number of tiny USB fixes for 3.4-rc4.
      
        Most of them are in the USB gadget area, but a few other minor USB
        driver and core fixes are here as well.
      
        Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
      
      * tag 'usb-3.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (36 commits)
        USB: serial: cp210x: Fixed usb_control_msg timeout values
        USB: ehci-tegra: don't call set_irq_flags(IRQF_VALID)
        USB: yurex: Fix missing URB_NO_TRANSFER_DMA_MAP flag in urb
        USB: yurex: Remove allocation of coherent buffer for setup-packet buffer
        drivers/usb/misc/usbtest.c: add kfrees
        USB: ehci-fsl: Fix kernel crash on mpc5121e
        uwb: fix error handling
        uwb: fix use of del_timer_sync() in interrupt
        EHCI: always clear the STS_FLR status bit
        EHCI: fix criterion for resuming the root hub
        USB: sierra: avoid QMI/wwan interface on MC77xx
        usb: usbtest: avoid integer overflow in alloc_sglist()
        usb: usbtest: avoid integer overflow in test_ctrl_queue()
        USB: fix deadlock in bConfigurationValue attribute method
        usb: gadget: eliminate NULL pointer dereference (bugfix)
        usb: gadget: uvc: Remove non-required locking from 'uvc_queue_next_buffer' routine
        usb: gadget: rndis: fix Missing req->context assignment
        usb: musb: omap: fix the error check for pm_runtime_get_sync
        usb: gadget: udc-core: fix asymmetric calls in remove_driver
        usb: musb: omap: fix crash when musb glue (omap) gets initialized
        ...
      1cd653a6
    • Linus Torvalds's avatar
      Merge tag 'stable/for-linus-3.4-rc3-tag' of... · c1acb0ba
      Linus Torvalds authored
      Merge tag 'stable/for-linus-3.4-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
      
      Pull xen fixes from Konrad Rzeszutek Wilk:
       - mechanism to work with misconfigured backends (where they are
         advertised but in reality don't exist).
       - two tiny compile warning fixes.
       - proper error handling in gnttab_resume
       - Not using VM_PFNMAP anymore to allow backends in the same domain.
      
      * tag 'stable/for-linus-3.4-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        Revert "xen/p2m: m2p_find_override: use list_for_each_entry_safe"
        xen/resume: Fix compile warnings.
        xen/xenbus: Add quirk to deal with misconfigured backends.
        xen/blkback: Fix warning error.
        xen/p2m: m2p_find_override: use list_for_each_entry_safe
        xen/gntdev: do not set VM_PFNMAP
        xen/grant-table: add error-handling code on failure of gnttab_resume
      c1acb0ba
    • Linus Torvalds's avatar
      Revert "ACPI: ignore FADT reset-reg-sup flag" · 19244ad0
      Linus Torvalds authored
      This reverts commit cf450136.
      
      It breaks reboot on at least one Thinkpad T43, as reported by Jörg Otte:
       "On reboot it shuts down as normal.
        The last lines displayed are:
      
        >Unmounting temporary filesystems.. [OK]
        >Deactivating swap...               [OK]
        >Unmounting local filesystems...    [OK]
        >Will now restart
        >    Restarting system
      
        Then I hear it accessing the cd-drive, but then it's being stuck."
      
      Jörg bisected the regression to this commit.
      
      That commit fixes another machine (see
      
        https://bugzilla.kernel.org/show_bug.cgi?id=11533
      
      for details) that has a BIOS bug and doesn't support ACPI reset.
      However, at least one of those other reporters no longer even has the
      machine in question, and had a different workaround to begin with.
      Besides, it clearly was a buggy BIOS.  Let's not break the correct case
      to fix that case.
      Reported-and-bisected-by: default avatarJörg Otte <jrg.otte@googlemail.com>
      Cc: linux-acpi@vger.kernel.org
      Cc: Len Brown <lenb@kernel.org>
      Cc: Peter Anvin <hpa@zytor.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      19244ad0