1. 28 Jun, 2016 6 commits
    • Jiri Olsa's avatar
      perf symbols: Use proper dso name for is_regular_file · ed7b630b
      Jiri Olsa authored
      Marc reported use of uninitialized memory:
      
      > In commit "40356721 perf symbols: Do not read symbols/data from
      > device files" a check to uninitialzied memory was added. This leads to
      > the following valgrind output:
      >
      >  ==24515== Syscall param stat(file_name) points to uninitialised byte(s)
      >  ==24515==    at 0x75B26D5: _xstat (in /lib/x86_64-linux-gnu/libc-2.22.so)
      >  ==24515==    by 0x4E548D: stat (stat.h:454)
      >  ==24515==    by 0x4E548D: is_regular_file (util.c:687)
      >  ==24515==    by 0x4A5BEE: dso__load (symbol.c:1435)
      >  ==24515==    by 0x4BB1AE: map__load (map.c:289)
      >  ==24515==    by 0x4BB1AE: map__find_symbol (map.c:333)
      >  ==24515==    by 0x4835B3: thread__find_addr_location (event.c:1300)
      >  ==24515==    by 0x4B5342: add_callchain_ip (machine.c:1652)
      >  ==24515==    by 0x4B5342: thread__resolve_callchain_sample (machine.c:1906)
      >  ==24515==    by 0x4B9E7D: thread__resolve_callchain (machine.c:1958)
      >  ==24515==    by 0x441B3E: process_event (builtin-script.c:795)
      >  ==24515==    by 0x441B3E: process_sample_event (builtin-script.c:920)
      >  ==24515==    by 0x4BEE29: perf_evlist__deliver_sample (session.c:1192)
      >  ==24515==    by 0x4BEE29: machines__deliver_event (session.c:1229)
      >  ==24515==    by 0x4BF770: perf_session__deliver_event (session.c:1286)
      >  ==24515==    by 0x4BF770: ordered_events__deliver_event (session.c:114)
      >  ==24515==    by 0x4C1D17: __ordered_events__flush (ordered-events.c:207)
      >  ==24515==    by 0x4C1D17: ordered_events__flush.part.3 (ordered-events.c:274)
      >  ==24515==    by 0x4BF44C: perf_session__process_user_event (session.c:1325)
      >  ==24515==    by 0x4BF44C: perf_session__process_event (session.c:1451)
      >  ==24515==  Address 0x807c6a0 is 0 bytes inside a block of size 4,096 alloc'd
      >  ==24515==    at 0x4C29C0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
      >  ==24515==    by 0x4A5BCB: dso__load (symbol.c:1421)
      >  ==24515==    by 0x4BB1AE: map__load (map.c:289)
      >  ==24515==    by 0x4BB1AE: map__find_symbol (map.c:333)
      >  ==24515==    by 0x4835B3: thread__find_addr_location (event.c:1300)
      >  ==24515==    by 0x4B5342: add_callchain_ip (machine.c:1652)
      >  ==24515==    by 0x4B5342: thread__resolve_callchain_sample (machine.c:1906)
      >  ==24515==    by 0x4B9E7D: thread__resolve_callchain (machine.c:1958)
      >  ==24515==    by 0x441B3E: process_event (builtin-script.c:795)
      >  ==24515==    by 0x441B3E: process_sample_event (builtin-script.c:920)
      >  ==24515==    by 0x4BEE29: perf_evlist__deliver_sample (session.c:1192)
      >  ==24515==    by 0x4BEE29: machines__deliver_event (session.c:1229)
      >  ==24515==    by 0x4BF770: perf_session__deliver_event (session.c:1286)
      >  ==24515==    by 0x4BF770: ordered_events__deliver_event (session.c:114)
      >  ==24515==    by 0x4C1D17: __ordered_events__flush (ordered-events.c:207)
      >  ==24515==    by 0x4C1D17: ordered_events__flush.part.3 (ordered-events.c:274)
      >  ==24515==    by 0x4BF44C: perf_session__process_user_event (session.c:1325)
      >  ==24515==    by 0x4BF44C: perf_session__process_event (session.c:1451)
      >  ==24515==    by 0x4C0EAC: __perf_session__process_events (session.c:1804)
      >  ==24515==    by 0x4C0EAC: perf_session__process_events (session.c:1858)
      
      The reason was a typo that passed global 'name' variable as the
      is_regular_file argument instead dso->long_name.
      Reported-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Acked-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Wang Nan <wangnan0@huawei.com>
      Fixes: 40356721 ("perf symbols: Do not read symbols/data from device files")
      Link: http://lkml.kernel.org/r/1466772025-17471-2-git-send-email-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ed7b630b
    • Wang Nan's avatar
      perf record: Prepare picking perf_event_mmap_page from multiple evlists · ee667f94
      Wang Nan authored
      Following commits introduce new evlists to record. This patch adjusts
      record__pick_pc() and introduces perf_evlist__pick_pc() to read control
      page from one specific evlist. record__pick_pc() will be improved to
      search control page from multiple evlists.
      Signed-off-by: default avatarWang Nan <wangnan0@huawei.com>
      Cc: He Kuang <hekuang@huawei.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nilay Vaish <nilayvaish@gmail.com>
      Cc: Zefan Li <lizefan@huawei.com>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/r/1467023052-146749-4-git-send-email-wangnan0@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ee667f94
    • Wang Nan's avatar
      perf record: Prepare reading from multiple evlists in record__mmap_read_all() · cb21686b
      Wang Nan authored
      Following commits introduce new evlists to record. This patch adjusts
      record__mmap_read_all() and record__mmap_read(): converting original
      record__mmap_read_all() to record__mmap_read_evlist(), read from one
      evlist; makes record__mmap_read() reading from specific evlist.
      record__mmap_read_all() will be improved to read from multiple evlists.
      Signed-off-by: default avatarWang Nan <wangnan0@huawei.com>
      Cc: He Kuang <hekuang@huawei.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nilay Vaish <nilayvaish@gmail.com>
      Cc: Zefan Li <lizefan@huawei.com>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/r/1467023052-146749-3-git-send-email-wangnan0@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      cb21686b
    • Wang Nan's avatar
      perf record: Move mmap setup block to separate function · cda57a8c
      Wang Nan authored
      Following commits introduce multiple evlists to record. This patch
      extracts perf_evlist__mmap_ex() processing to a new function, creates
      record__mmap() and record__mmap_evlist() to wrap perf_evlist__mmap_ex()
      and its error processing. They will be improvemented to create mmap for
      all evlists.
      Signed-off-by: default avatarWang Nan <wangnan0@huawei.com>
      Cc: He Kuang <hekuang@huawei.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nilay Vaish <nilayvaish@gmail.com>
      Cc: Zefan Li <lizefan@huawei.com>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/r/1467023052-146749-2-git-send-email-wangnan0@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      cda57a8c
    • Jiri Olsa's avatar
      perf data convert: Include config.h header · f6c12a00
      Jiri Olsa authored
      Otherwise some compiler might scream:
      
        $ make LIBBABELTRACE_DIR=/opt/libbabeltrace/ LIBBABELTRACE=1
          BUILD:   Doing 'make -j4' parallel build
          CC       util/data-convert-bt.o
        util/data-convert-bt.c: In function ‘convert__config’:
        util/data-convert-bt.c:1299:19: error: implicit declaration of function ‘perf_config_u64’ [-Werror=implicit-function-declaration]
           c->queue_size = perf_config_u64(var, value);
        ...
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: He Kuang <hekuang@huawei.com>
      Cc: Marc Kleine-Budde <mkl@pengutronix.de>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Taeung Song <treeze.taeung@gmail.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Fixes: 41840d21 ("perf config: Move config declarations from util/cache.h to util/config.h")
      Link: http://lkml.kernel.org/r/1466772025-17471-1-git-send-email-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f6c12a00
    • Wang Nan's avatar
      perf build: Add libbabeltrace to build-test · f5ce4573
      Wang Nan authored
      'make build-test' doesn't test LIBBABELTRACE=1. It misses a building
      failure caused by commit 41840d21 ("perf config: Move config
      declarations from util/cache.h to util/config.h"), breaks bisect.
      
      Add LIBBABELTRACE=1 to build-test.
      Signed-off-by: default avatarWang Nan <wangnan0@huawei.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Zefan Li <lizefan@huawei.com>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/r/1466818918-131281-1-git-send-email-wangnan0@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f5ce4573
  2. 27 Jun, 2016 11 commits
  3. 26 Jun, 2016 2 commits
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 2ac9b973
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Two straightforward fixes.
      
        One is a concurrency issue only affecting SAS connected SATA drives,
        but which could hang the storage subsystem if it triggers (because the
        outstanding command count on error never goes back to zero) and the
        other is a NO_TAG fallout from the switch to hostwide tags which
        causes the system to crash on module insertion (we've checked
        carefully and only the 53c700 family of drivers is vulnerable to this
        issue)"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        53c700: fix BUG on untagged commands
        scsi: fix race between simultaneous decrements of ->host_failed
      2ac9b973
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo-20160623' of... · 9840b1ae
      Ingo Molnar authored
      Merge tag 'perf-core-for-mingo-20160623' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
      
      Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
      
      New features:
      
      - Add 'callindent' option to 'perf script -F', to indent the Intel PT
        call stack, making this output more ftrace-like (Adrian Hunter, Andi Kleen)
      
      User visible changes:
      
      - Enlarge 'pid' column width, to cope with large pids (Jiri Olsa)
      
      Infrastructure changes:
      
      - Fix cross platform unwind (He Kuang)
      
      - Make destructors accept NULL, behaving like free() (Arnaldo Carvalho de Melo)
      
      - Remove reference to perl interpreted in the recently added 'perf script'
        stackcollapse python script (Arnaldo Carvalho de Melo)
      
      - Rename CLASS__for_each() macros to CLASS__for_each_entry(), to use the
        list_for_each_entry() semantics, as most of these class specific loop helpers
        are list_for_each_entry*() wrappers  (Arnaldo Carvalho de Melo)
      
      - Expose the hist_browser code, will be used with data structures other
        than perf_evsel (Jiri Olsa)
      
      - Refactor 'perf config' (Taeung Song)
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      9840b1ae
  4. 25 Jun, 2016 21 commits