1. 31 May, 2012 8 commits
    • Jiri Olsa's avatar
      perf evsel: Fix 32 bit values endianity swap for sample_id_all header · 37073f9e
      Jiri Olsa authored
      We swap the sample_id_all header by u64 pointers. Some members of the
      header happen to be 32 bit values. We need to handle them separatelly.
      
      Together with other endianity patches, this change fixies perf report
      discrepancies on origin and target systems as described in test 1 below,
      e.g. following perf report diff:
      
      ...
            0.12%               ps  [kernel.kallsyms]    [k] clear_page
      -     0.12%              awk  bash                 [.] alloc_word_desc
      +     0.12%              awk  bash                 [.] yyparse
            0.11%   beah-rhts-task  libpython2.6.so.1.0  [.] 0x5560e
            0.10%             perf  libc-2.12.so         [.] __ctype_toupper_loc
      -     0.09%  rhts-test-runne  bash                 [.] maybe_make_export_env
      +     0.09%  rhts-test-runne  bash                 [.] 0x385a0
            0.09%               ps  [kernel.kallsyms]    [k] page_fault
      ...
      
      Note, running following to test perf endianity handling:
      test 1)
        - origin system:
          # perf record -a -- sleep 10 (any perf record will do)
          # perf report > report.origin
          # perf archive perf.data
      
        - copy the perf.data, report.origin and perf.data.tar.bz2
          to a target system and run:
          # tar xjvf perf.data.tar.bz2 -C ~/.debug
          # perf report > report.target
          # diff -u report.origin report.target
      
        - the diff should produce no output
          (besides some white space stuff and possibly different
           date/TZ output)
      
      test 2)
        - origin system:
          # perf record -ag -fo /tmp/perf.data -- sleep 1
        - mount origin system root to the target system on /mnt/origin
        - target system:
          # perf script --symfs /mnt/origin -I -i /mnt/origin/tmp/perf.data \
           --kallsyms /mnt/origin/proc/kallsyms
        - complete perf.data header is displayed
      Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
      Reviewed-by: default avatarDavid Ahern <dsahern@gmail.com>
      Tested-by: default avatarDavid Ahern <dsahern@gmail.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1338380624-7443-4-git-send-email-jolsa@redhat.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      37073f9e
    • Jiri Olsa's avatar
      perf session: Handle endianity swap on sample_id_all header data · 268fb20f
      Jiri Olsa authored
      Adding endianity swapping for event header attached via sample_id_all.
      
      Currently we dont do that and it's causing wrong data to be read when
      running report on architecture with different endianity than the record.
      
      The perf is currently able to process 32-bit PPC samples on 32-bit
      and 64-bit x86.
      
      Together with other endianity patches, this change fixies perf report
      discrepancies on origin and target systems as described in test 1
      below, e.g. following perf report diff:
      
      ...
            0.12%               ps  [kernel.kallsyms]    [k] clear_page
      -     0.12%              awk  bash                 [.] alloc_word_desc
      +     0.12%              awk  bash                 [.] yyparse
            0.11%   beah-rhts-task  libpython2.6.so.1.0  [.] 0x5560e
            0.10%             perf  libc-2.12.so         [.] __ctype_toupper_loc
      -     0.09%  rhts-test-runne  bash                 [.] maybe_make_export_env
      +     0.09%  rhts-test-runne  bash                 [.] 0x385a0
            0.09%               ps  [kernel.kallsyms]    [k] page_fault
      ...
      
      Note, running following to test perf endianity handling:
      test 1)
        - origin system:
          # perf record -a -- sleep 10 (any perf record will do)
          # perf report > report.origin
          # perf archive perf.data
      
        - copy the perf.data, report.origin and perf.data.tar.bz2
          to a target system and run:
          # tar xjvf perf.data.tar.bz2 -C ~/.debug
          # perf report > report.target
          # diff -u report.origin report.target
      
        - the diff should produce no output
          (besides some white space stuff and possibly different
           date/TZ output)
      
      test 2)
        - origin system:
          # perf record -ag -fo /tmp/perf.data -- sleep 1
        - mount origin system root to the target system on /mnt/origin
        - target system:
          # perf script --symfs /mnt/origin -I -i /mnt/origin/tmp/perf.data \
           --kallsyms /mnt/origin/proc/kallsyms
        - complete perf.data header is displayed
      Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
      Reviewed-by: default avatarDavid Ahern <dsahern@gmail.com>
      Tested-by: default avatarDavid Ahern <dsahern@gmail.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1338380624-7443-3-git-send-email-jolsa@redhat.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      268fb20f
    • Jiri Olsa's avatar
      perf symbols: Handle different endians properly during symbol load · 8db4841f
      Jiri Olsa authored
      Currently we dont care about the file object's endianness. It's possible
      we read buildid file object from different architecture than we are
      currentlly running on. So we need to care about properly reading such
      object's data - handle different endianness properly.
      
      Adding:
      	needs_swap DSO field
      	dso__swap_init function to initialize DSO's needs_swap
      	DSO__SWAP to read the data with proper swaps
      
      Together with other endianity patches, this change fixies perf report
      discrepancies on origin and target systems as described in test 1 below,
      e.g. following perf report diff:
      
      ...
            0.12%               ps  [kernel.kallsyms]    [k] clear_page
      -     0.12%              awk  bash                 [.] alloc_word_desc
      +     0.12%              awk  bash                 [.] yyparse
            0.11%   beah-rhts-task  libpython2.6.so.1.0  [.] 0x5560e
            0.10%             perf  libc-2.12.so         [.] __ctype_toupper_loc
      -     0.09%  rhts-test-runne  bash                 [.] maybe_make_export_env
      +     0.09%  rhts-test-runne  bash                 [.] 0x385a0
            0.09%               ps  [kernel.kallsyms]    [k] page_fault
      ...
      
      Note, running following to test perf endianity handling:
      test 1)
        - origin system:
          # perf record -a -- sleep 10 (any perf record will do)
          # perf report > report.origin
          # perf archive perf.data
      
        - copy the perf.data, report.origin and perf.data.tar.bz2
          to a target system and run:
          # tar xjvf perf.data.tar.bz2 -C ~/.debug
          # perf report > report.target
          # diff -u report.origin report.target
      
        - the diff should produce no output
          (besides some white space stuff and possibly different
           date/TZ output)
      
      test 1)
        - origin system:
          # perf record -ag -fo /tmp/perf.data -- sleep 1
        - mount origin system root to the target system on /mnt/origin
        - target system:
          # perf script --symfs /mnt/origin -I -i /mnt/origin/tmp/perf.data \
           --kallsyms /mnt/origin/proc/kallsyms
        - complete perf.data header is displayed
      Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1338380624-7443-2-git-send-email-jolsa@redhat.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8db4841f
    • Namhyung Kim's avatar
      perf evlist: Pass third argument to ioctl explicitly · 55da8005
      Namhyung Kim authored
      The ioctl on perf event fd wants 3 arguments but we only passed 2. As
      the only user of the functions is perf record and it calls them for
      every event (regardless of group setting), just pass 0 for now.
      Signed-off-by: default avatarNamhyung Kim <namhyung.kim@lge.com>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1338443506-25009-3-git-send-email-namhyung.kim@lge.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      55da8005
    • Namhyung Kim's avatar
      perf tools: Update ioctl documentation for PERF_IOC_FLAG_GROUP · a59e64a1
      Namhyung Kim authored
      The ioctl interface of perf event fd receives 3 arguments to control
      event group behavior but it lacked documentation.
      Signed-off-by: default avatarNamhyung Kim <namhyung.kim@lge.com>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1338443506-25009-2-git-send-email-namhyung.kim@lge.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a59e64a1
    • Arnaldo Carvalho de Melo's avatar
      perf tools: Make --version show kernel version instead of pull req tag · aa5cdd30
      Arnaldo Carvalho de Melo authored
      Before:
      
        $ perf --version
        perf version perf.urgent.for.mingo.5.g37da28
      
      After:
      
        $ perf --version
        perf version 3.4.8941.g37da28.dirty
      
      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@gmail.com>
      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-vc9b4e6023iegz9kabr3yvyv@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      aa5cdd30
    • Namhyung Kim's avatar
      perf tools: Check if callchain is corrupted · 114067b6
      Namhyung Kim authored
      We faced segmentation fault on perf top -G at very high sampling rate
      due to a corrupted callchain. While the root cause was not revealed (I
      failed to figure it out), this patch tries to protect us from the
      segfault on such cases.
      Reported-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarNamhyung Kim <namhyung.kim@lge.com>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Sunjin Yang <fan4326@gmail.com>
      Link: http://lkml.kernel.org/r/1338443007-24857-2-git-send-email-namhyung.kim@lge.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      114067b6
    • Namhyung Kim's avatar
      perf callchain: Make callchain cursors TLS · 47260645
      Namhyung Kim authored
      perf top -G has a race on callchain cursor between main thread and
      display thread. Since the callchain cursors are used locally make them
      thread-local data would solve the problem.
      Signed-off-by: default avatarNamhyung Kim <namhyung.kim@lge.com>
      Reported-by: default avatarSunjin Yang <fan4326@gmail.com>
      Suggested-by: default avatarArnaldo Carvalho de Melo <acme@ghostprotocols.net>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Sunjin Yang <fan4326@gmail.com>
      Link: http://lkml.kernel.org/r/1338443007-24857-1-git-send-email-namhyung.kim@lge.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      47260645
  2. 30 May, 2012 18 commits
    • Avik Sil's avatar
      perf tools: Fix pager on minimal-install embedded systems · ea1b3eba
      Avik Sil authored
      Some Distributions may lack "less" package being included by default,
      e.g., Linaro nano rootfs. In those cases use the portable "pager"
      command instead of "less".
      Signed-off-by: default avatarAvik Sil <avik.sil@linaro.org>
      Acked-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1338287725-26382-1-git-send-email-avik.sil@linaro.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ea1b3eba
    • Arnaldo Carvalho de Melo's avatar
      perf tools: Fix make tarballs · f1439c31
      Arnaldo Carvalho de Melo authored
      The patch series that introduced the top level tools/ makefile and the
      libtraceevent broke this feature where files needed to build in a
      detached tarball were not included in the MANIFEST file and thus not
      included in the tarball.
      
      Fix it by adding the relevant files to the MANIFEST.
      
      Cc: Borislav Petkov <borislav.petkov@amd.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@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/n/tip-z3mjj74927xvqwhlmu18kj80@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f1439c31
    • David Ahern's avatar
      perf script: Fix regression in callchain dso name · 52deff71
      David Ahern authored
      $ perf script -i /tmp/perf.data
      ...
      gcc 13623 544315.062858: context-switches:
          ffffffff815f65c9 __schedule ([kernel.kallsyms])
          ffffffff81087cea __cond_resched ([kernel.kallsyms])
          ffffffff815f6b92 _cond_resched ([kernel.kallsyms])
          ffffffff815fb87a do_page_fault ([kernel.kallsyms])
          ffffffff815f8465 page_fault ([kernel.kallsyms])
              2b7a71ea0303 _dl_lookup_symbol_x ([kernel.kallsyms])
              2b7a71ea1eb5 _dl_relocate_object ([kernel.kallsyms])
              2b7a71e99b2e dl_main ([kernel.kallsyms])
              2b7a71eab7f4 _dl_sysdep_start ([kernel.kallsyms])
      
      All DSO's in a callchain are printed as [kernel.kallsyms].
      
      git bisect chased it to:
      
      547a92e0 is the first bad commit
      commit 547a92e0
      Author: Akihiro Nagai <akihiro.nagai.hw@hitachi.com>
      Date:   Mon Jan 30 13:42:57 2012 +0900
      
          perf script: Unify the expressions indicating "unknown"
      
          The perf script command uses various expressions to indicate "unknown".
      
          It is unfriendly for user scripts to parse it. So, this patch unifies
          the expressions to "[unknown]".
      
      Looks like a copy-paste in that the other references use al.map but this one
      should be node->map.
      
      With this patch you get:
      
      $ perf script -i /tmp/perf.data
      ...
      gcc 13623 544315.062858: context-switches:
          ffffffff815f65c9 __schedule ([kernel.kallsyms])
          ffffffff81087cea __cond_resched ([kernel.kallsyms])
          ffffffff815f6b92 _cond_resched ([kernel.kallsyms])
          ffffffff815fb87a do_page_fault ([kernel.kallsyms])
          ffffffff815f8465 page_fault ([kernel.kallsyms])
              2b7a71ea0303 _dl_lookup_symbol_x (/lib64/ld-2.14.90.so)
              2b7a71ea1eb5 _dl_relocate_object (/lib64/ld-2.14.90.so)
              2b7a71e99b2e dl_main (/lib64/ld-2.14.90.so)
              2b7a71eab7f4 _dl_sysdep_start (/lib64/ld-2.14.90.so)
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Cc: Akihiro Nagai <akihiro.nagai.hw@hitachi.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1338353906-60706-1-git-send-email-dsahern@gmail.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      52deff71
    • Arnaldo Carvalho de Melo's avatar
      perf stat: Initialize default events wrt exclude_{guest,host} · 79695e1b
      Arnaldo Carvalho de Melo authored
      When no event is specified the tools use perf_evlist__add_default(), that will
      call event_attr_init to initialize the KVM exclusion bits.
      
      When the change was made to the tools so that by default guest samples would be
      excluded, the changes were made just to the parsing routines and to
      perf_evlist__add_default(), not to perf_evlist__add_attrs, that is used so far
      just by perf stat to add multiple events, according to the level of detail
      specified.
      
      Recently the tools were changed to reconstruct the event name from all the
      details in perf_event_attr, not just from .type and .config, but taking into
      account all the feature bits (.exclude_{guest,host,user,kernel,etc},
      .precise_ip, etc).
      
      That is when we noticed that the default for perf stat wasn't the one for the
      rest of the tools, i.e. the .exclude_guest bit wasn't being set.
      
      I.e. the default, that doesn't call event_attr_init was showing the :HG
      modifier:
      
        $ perf stat usleep 1
      
         Performance counter stats for 'usleep 1':
      
                  0.942119 task-clock                #    0.454 CPUs utilized
                         1 context-switches          #    0.001 M/sec
                         0 CPU-migrations            #    0.000 K/sec
                       126 page-faults               #    0.134 M/sec
                   693,193 cycles:HG                 #    0.736 GHz                     [40.11%]
                   407,461 stalled-cycles-frontend:HG #   58.78% frontend cycles idle    [72.29%]
                   365,403 stalled-cycles-backend:HG #   52.71% backend  cycles idle
                   465,982 instructions:HG           #    0.67  insns per cycle
                                                     #    0.87  stalled cycles per insn
                    89,760 branches:HG               #   95.275 M/sec
                     6,178 branch-misses:HG          #    6.88% of all branches
      
               0.002077228 seconds time elapsed
      
      While if one explicitely specifies the same events, which will make the parsing code
      to be called and thus event_attr_init is called:
      
        $ perf stat -e task-clock,context-switches,migrations,page-faults,cycles,stalled-cycles-frontend,stalled-cycles-backend,instructions,branches,branch-misses usleep 1
      
         Performance counter stats for 'usleep 1':
      
                  1.040349 task-clock                #    0.500 CPUs utilized
                         2 context-switches          #    0.002 M/sec
                         0 CPU-migrations            #    0.000 K/sec
                       127 page-faults               #    0.122 M/sec
                   587,966 cycles                    #    0.565 GHz                     [13.18%]
                   459,167 stalled-cycles-frontend   #   78.09% frontend cycles idle
                   390,249 stalled-cycles-backend    #   66.37% backend  cycles idle
                   504,006 instructions              #    0.86  insns per cycle
                                                     #    0.91  stalled cycles per insn
                    96,455 branches                  #   92.714 M/sec
                     6,522 branch-misses             #    6.76% of all branches         [96.12%]
      
               0.002078681 seconds time elapsed
      
      Fix it by introducing a perf_evlist__add_default_attrs method that will call
      evlist_attr_init in all the perf_event_attr entries before adding the events.
      Reported-by: default avatarIngo Molnar <mingo@kernel.org>
      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@gmail.com>
      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-4eysr236r0pgiyum9epwxw7s@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      79695e1b
    • Arnaldo Carvalho de Melo's avatar
      perf annotate browser: Fix help window entry for navigating to hottest line · 107baeca
      Arnaldo Carvalho de Melo authored
      Its 'H', not 'h'. The later is for getting to the help window.
      Reported-by: default avatarIngo Molnar <mingo@kernel.org>
      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@gmail.com>
      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-7zvwphhm815y2zczoxgstzuf@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      107baeca
    • Arnaldo Carvalho de Melo's avatar
      perf report: Use the right symbol for annotation · 91557e84
      Arnaldo Carvalho de Melo authored
      In non symbolic views, i.e. --sort without "symbol", as in:
      
       perf report --sort comm
      
      We're segfaulting in the --tui because we're testing the symbol resolved
      and then trying to use the symbol on the histogram entry where we're
      coalescing all hits for a COMM, and the first hist_entry for a comm may
      have a NULL symbol, i.e. the RIP didn't resolve to any symbol.
      
      In this case we're segfaulting, fix it by testing against the symbol in
      the histogram entry.
      Reported-by: default avatarWilliam Cohen <wcohen@redhat.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@gmail.com>
      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-8ylwubbcmu27ucc9ffrku3yv@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      91557e84
    • Ingo Molnar's avatar
      Merge branch 'linus' into perf/urgent · 063e0477
      Ingo Molnar authored
      Merge back Linus's latest branch so that we pick up the uprobes changes.
      
      ( I tested this branch locally and while it's one from the middle of the
        merge window it's a good one to base further work off. )
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      063e0477
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo' of... · 59cd358a
      Ingo Molnar authored
      Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
      
      Annotation fixes/improvements from Arnaldo Carvalho de Melo:
      
      . Make the annotatation toggles (hide_src_code, jump_arrows, use_offset, etc)
        global so that navigation doesn't resets them on new annotations.
      
      . Introduce an '[annotate]' config file section to allow permanent changes
        to the annotate browser defaults.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      59cd358a
    • Ingo Molnar's avatar
      Merge tag 'perf-urgent-for-mingo' of... · 55b78e34
      Ingo Molnar authored
      Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
      
      Fixes for perf/urgent from Arnaldo Carvalho de Melo:
      
       * Fix fallback to --stdio when TUI not supported, from Namhyung Kim.
      
       * Use right cast for pointers/long in libtraceevent, from Namhyung Kim.
      
       * Be consistent on using the right error reporting interface for fatal errors,
         from Namhyung Kim.
      
       * Fix fallback to --stdio when TUI not supported, from Namhyung Kim.
      
       * Use the right index in asm only view in the annotate browser.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      55b78e34
    • Linus Torvalds's avatar
      Merge branch 'x86-trampoline-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 731a7378
      Linus Torvalds authored
      Pull x86 trampoline rework from H. Peter Anvin:
       "This code reworks all the "trampoline"/"realmode" code (various bits
        that need to live in the first megabyte of memory, most but not all of
        which runs in real mode at some point) in the kernel into a single
        object.  The main reason for doing this is that it eliminates the last
        place in the kernel where we needed pages to be mapped RWX.  This code
        separates all that code into proper R/RW/RX pages."
      
      Fix up conflicts in arch/x86/kernel/Makefile (mca removed next to reboot
      code), and arch/x86/kernel/reboot.c (reboot code moved around in one
      branch, modified in this one), and arch/x86/tools/relocs.c (mostly same
      code came in earlier due to working around the ld bugs just before the
      3.4 release).
      
      Also remove stale x86-relocs entry from scripts/.gitignore as per Peter
      Anvin.
      
      * commit '61f54461': (36 commits)
        x86, realmode: Move end signature into header.S
        x86, relocs: When printing an error, say relative or absolute
        x86, relocs: More relocations which may end up as absolute
        x86, relocs: Workaround for binutils 2.22.52.0.1 section bug
        xen-acpi-processor: Add missing #include <xen/xen.h>
        acpi, bgrd: Add missing <linux/io.h> to drivers/acpi/bgrt.c
        x86, realmode: Change EFER to a single u64 field
        x86, realmode: Move kernel/realmode.c to realmode/init.c
        x86, realmode: Move not-common bits out of trampoline_common.S
        x86, realmode: Mask out EFER.LMA when saving trampoline EFER
        x86, realmode: Fix no cache bits test in reboot_32.S
        x86, realmode: Make sure all generated files are listed in targets
        x86, realmode: build fix: remove duplicate build
        x86, realmode: read cr4 and EFER from kernel for 64-bit trampoline
        x86, realmode: fixes compilation issue in tboot.c
        x86, realmode: move relocs from scripts/ to arch/x86/tools
        x86, realmode: header for trampoline code
        x86, realmode: flattened rm hierachy
        x86, realmode: don't copy real_mode_header
        x86, realmode: fix 64-bit wakeup sequence
        ...
      731a7378
    • Arnaldo Carvalho de Melo's avatar
      perf ui browser: Stop using 'self' · 05e8b080
      Arnaldo Carvalho de Melo authored
      Stop using this python/OOP convention, doesn't really helps. Will do
      more from time to time till we get it cleaned up in all of /perf.
      Suggested-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@gmail.com>
      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-5dyxyb8o0gf4yndk27kafbd1@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      05e8b080
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac · 87a5af24
      Linus Torvalds authored
      Pull EDAC internal API changes from Mauro Carvalho Chehab:
       "This changeset is the first part of a series of patches that fixes the
        EDAC sybsystem.  On this set, it changes the Kernel EDAC API in order
        to properly represent the Intel i3/i5/i7, Xeon 3xxx/5xxx/7xxx, and
        Intel E5-xxxx memory controllers.
      
        The EDAC core used to assume that:
      
             - the DRAM chip select pin is directly accessed by the memory
               controller
      
             - when multiple channels are used, they're all filled with the
               same type of memory.
      
        None of the above premises is true on Intel memory controllers since
        2002, when RAMBUS and FB-DIMMs were introduced, and Advanced Memory
        Buffer or by some similar technologies hides the direct access to the
        DRAM pins.
      
        So, the existing drivers for those chipsets had to lie to the EDAC
        core, in general telling that just one channel is filled.  That
        produces some hard to understand error messages like:
      
             EDAC MC0: CE row 3, channel 0, label "DIMM1": 1 Unknown error(s): memory read error on FATAL area : cpu=0 Err=0008:00c2 (ch=2), addr = 0xad1f73480 => socket=0, Channel=0(mask=2), rank=1
      
        The location information there (row3 channel 0) is completely bogus:
        it has no physical meaning, and are just some random values that the
        driver uses to talk with the EDAC core.  The error actually happened
        at CPU socket 0, channel 0, slot 1, but this is not reported anywhere,
        as the EDAC core doesn't know anything about the memory layout.  So,
        only advanced users that know how the EDAC driver works and that tests
        their systems to see how DIMMs are mapped can actually benefit for
        such error logs.
      
        This patch series fixes the error report logic, in order to allow the
        EDAC to expose the memory architecture used by them to the EDAC core.
        So, as the EDAC core now understands how the memory is organized, it
        can provide an useful report:
      
             EDAC MC0: CE memory read error on DIMM1 (channel:0 slot:1 page:0x364b1b offset:0x600 grain:32 syndrome:0x0 - count:1 area:DRAM err_code:0001:0090 socket:0 channel_mask:1 rank:4)
      
        The location of the DIMM where the error happened is reported by "MC0"
        (cpu socket #0), at "channel:0 slot:1" location, and matches the
        physical location of the DIMM.
      
        There are two remaining issues not covered by this patch series:
      
             - The EDAC sysfs API will still report bogus values.  So,
               userspace tools like edac-utils will still use the bogus data;
      
             - Add a new tracepoint-based way to get the binary information
               about the errors.
      
        Those are on a second series of patches (also at -next), but will
        probably miss the train for 3.5, due to the slow review process."
      
      Fix up trivial conflict (due to spelling correction of removed code) in
      drivers/edac/edac_device.c
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac: (42 commits)
        i7core: fix ranks information at the per-channel struct
        i5000: Fix the fatal error handling
        i5100_edac: Fix a warning when compiled with 32 bits
        i82975x_edac: Test nr_pages earlier to save a few CPU cycles
        e752x_edac: provide more info about how DIMMS/ranks are mapped
        i5000_edac: Fix the logic that retrieves memory information
        i5400_edac: improve debug messages to better represent the filled memory
        edac: Cleanup the logs for i7core and sb edac drivers
        edac: Initialize the dimm label with the known information
        edac: Remove the legacy EDAC ABI
        x38_edac: convert driver to use the new edac ABI
        tile_edac: convert driver to use the new edac ABI
        sb_edac: convert driver to use the new edac ABI
        r82600_edac: convert driver to use the new edac ABI
        ppc4xx_edac: convert driver to use the new edac ABI
        pasemi_edac: convert driver to use the new edac ABI
        mv64x60_edac: convert driver to use the new edac ABI
        mpc85xx_edac: convert driver to use the new edac ABI
        i82975x_edac: convert driver to use the new edac ABI
        i82875p_edac: convert driver to use the new edac ABI
        ...
      87a5af24
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 7e5b2db7
      Linus Torvalds authored
      Pull MIPS updates from Ralf Baechle:
       "The whole series has been sitting in -next for quite a while with no
        complaints.  The last change to the series was before the weekend the
        removal of an SPI patch which Grant - even though previously acked by
        himself - appeared to raise objections.  So I removed it until the
        situation is clarified.  Other than that all the patches have the acks
        from their respective maintainers, all MIPS and x86 defconfigs are
        building fine and I'm not aware of any problems introduced by this
        series.
      
        Among the key features for this patch series is a sizable patchset for
        Lantiq which among other things introduces support for Lantiq's
        flagship product, the FALCON SOC.  It also means that the opensource
        developers behind this patchset have overtaken Lantiq's competing
        inhouse development team that was working behind closed doors.
      
        Less noteworthy the ath79 patchset which adds support for a few more
        chip variants, cleanups and fixes.  Finally the usual dose of tweaking
        of generic code."
      
      Fix up trivial conflicts in arch/mips/lantiq/xway/gpio_{ebu,stp}.c where
      printk spelling fixes clashed with file move and eventual removal of the
      printk.
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (81 commits)
        MIPS: lantiq: remove orphaned code
        MIPS: Remove all -Wall and almost all -Werror usage from arch/mips.
        MIPS: lantiq: implement support for FALCON soc
        MTD: MIPS: lantiq: verify that the NOR interface is available on falcon soc
        MTD: MIPS: lantiq: implement OF support
        watchdog: MIPS: lantiq: implement OF support and minor fixes
        SERIAL: MIPS: lantiq: implement OF support
        GPIO: MIPS: lantiq: convert gpio-stp-xway to OF
        GPIO: MIPS: lantiq: convert gpio-mm-lantiq to OF and of_mm_gpio
        GPIO: MIPS: lantiq: move gpio-stp and gpio-ebu to the subsystem folder
        MIPS: pci: convert lantiq driver to OF
        MIPS: lantiq: convert dma to platform driver
        MIPS: lantiq: implement support for clkdev api
        MIPS: lantiq: drop ltq_gpio_request() and gpio_to_irq()
        OF: MIPS: lantiq: implement irq_domain support
        OF: MIPS: lantiq: implement OF support
        MIPS: lantiq: drop mips_machine support
        OF: PCI: const usage needed by MIPS
        MIPS: Cavium: Remove smp_reserve_lock.
        MIPS: Move cache setup to setup_arch().
        ...
      7e5b2db7
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm · 227d1e43
      Linus Torvalds authored
      Pull arm updates from Russell King:
       "This contains both some fixes found when trying to get the
        Assabet+neponset setup as a replacement firewall with a 3c589 PCMCIA
        card, and a bunch of changes from Al to fix up the ARM signal
        handling, particularly some of the restart behaviour."
      
      * 'for-linus' of git://git.linaro.org/people/rmk/linux-arm:
        ARM: neponset: make sure neponset_ncr_frob() is exported
        ARM: fix out[bwl]()
        arm: don't open-code ptrace_report_syscall()
        arm: bury unused _TIF_RESTORE_SIGMASK
        arm: remove unused restart trampoline
        arm: new way of handling ERESTART_RESTARTBLOCK
        arm: if we get into work_pending while returning to kernel mode, just go away
        arm: don't call try_to_freeze() from do_signal()
        arm: if there's no handler we need to restore sigmask, syscall or no syscall
        arm: trim _TIF_WORK_MASK, get rid of useless test and branch...
        arm: missing checks of __get_user()/__put_user() return values
      227d1e43
    • Arnaldo Carvalho de Melo's avatar
      perf annotate browser: Read perf config file for settings · c323cf04
      Arnaldo Carvalho de Melo authored
      The defaults are:
      
      [annotate]
      
      	hide_src_code = false
      	use_offset = true
      	jump_arrows = true
      	show_nr_jumps = false
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@gmail.com>
      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-q4egci70rjgxh7bogbbfpcyf@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c323cf04
    • Linus Torvalds's avatar
      Merge branch 'akpm' (Andrew's patch-bomb) · 7d36014b
      Linus Torvalds authored
      Merge patches through Andrew Morton:
       "180 patches - err 181 - listed below:
      
         - most of MM.  I held back the (large) "memcg: add hugetlb extension"
           series because a bunfight has recently broken out.
      
         - leds.  After this, Bryan Wu will be handling drivers/leds/
      
         - backlight
      
         - lib/
      
         - rtc"
      
      * emailed from Andrew Morton <akpm@linux-foundation.org>: (181 patches)
        drivers/rtc/rtc-s3c.c: fix compiler warning
        drivers/rtc/rtc-tegra.c: clean up probe/remove routines
        drivers/rtc/rtc-pl031.c: remove RTC timer interrupt handling
        drivers/rtc/rtc-lpc32xx.c: add device tree support
        drivers/rtc/rtc-m41t93.c: don't let get_time() reset M41T93_FLAG_OF
        rtc: ds1307: add trickle charger support
        rtc: ds1307: remove superfluous initialization
        rtc: rename CONFIG_RTC_MXC to CONFIG_RTC_DRV_MXC
        drivers/rtc/Kconfig: place RTC_DRV_IMXDI and RTC_MXC under "on-CPU RTC drivers"
        drivers/rtc/rtc-pcf8563.c: add RTC_VL_READ/RTC_VL_CLR ioctl feature
        rtc: add ioctl to get/clear battery low voltage status
        drivers/rtc/rtc-ep93xx.c: convert to use module_platform_driver()
        rtc/spear: add Device Tree probing capability
        lib/vsprintf.c: "%#o",0 becomes '0' instead of '00'
        radix-tree: fix preload vector size
        spinlock_debug: print kallsyms name for lock
        vsprintf: fix %ps on non symbols when using kallsyms
        lib/bitmap.c: fix documentation for scnprintf() functions
        lib/string_helpers.c: make arrays static
        lib/test-kstrtox.c: mark const init data with __initconst instead of __initdata
        ...
      7d36014b
    • Arnaldo Carvalho de Melo's avatar
      perf config: Allow '_' in config file variable names · 8dc7c651
      Arnaldo Carvalho de Melo authored
      For annotate I want to be able to have variables that are the same as
      the ones representing feature toggles.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@gmail.com>
      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-7rhhf6m0a72p2wja4tgv1itg@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8dc7c651
    • Arnaldo Carvalho de Melo's avatar
      perf annotate browser: Make feature toggles global · e9823b21
      Arnaldo Carvalho de Melo authored
      So that when navigating to another function from a call site or when
      going to another annotation browser thru the main report/top browser the
      options (hide source code, jump arrows, jumpy lines, etc) remains the
      last ones selected.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@gmail.com>
      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-0h0tah1zj59p01581snjufne@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e9823b21
  3. 29 May, 2012 14 commits