1. 15 6月, 2017 1 次提交
    • J
      perf tools: Fix build with ARCH=x86_64 · 7a759cd8
      Jiada Wang 提交于
      With commit: 0a943cb1 (tools build: Add HOSTARCH Makefile variable)
      when building for ARCH=x86_64, ARCH=x86_64 is passed to perf instead of
      ARCH=x86, so the perf build process searchs header files from
      tools/arch/x86_64/include, which doesn't exist.
      
      The following build failure is seen:
      
        In file included from util/event.c:2:0:
          tools/include/uapi/linux/mman.h:4:27: fatal error: uapi/asm/mman.h: No such file or directory
          compilation terminated.
      
      Fix this issue by using SRCARCH instead of ARCH in perf, just like the
      main kernel Makefile and tools/objtool's.
      Signed-off-by: NJiada Wang <jiada_wang@mentor.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Eugeniu Rosca <erosca@de.adit-jv.com>
      Cc: Jan Stancek <jstancek@redhat.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
      Cc: Rui Teng <rui.teng@linux.vnet.ibm.com>
      Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Fixes: 0a943cb1 ("tools build: Add HOSTARCH Makefile variable")
      Link: http://lkml.kernel.org/r/1491793357-14977-2-git-send-email-jiada_wang@mentor.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      7a759cd8
  2. 18 2月, 2017 1 次提交
    • J
      perf build: Add special fixdep cleaning rule · 85e0d509
      Jiri Olsa 提交于
      Ingo reported following build failure:
      
      On Sat, Feb 11, 2017 at 12:12:34PM +0100, Ingo Molnar wrote:
      >
      > So I had this oldish 32-bit 15.10 Ubuntu installation around (fully updated), and
      > trying to build perf gave me:
      >
      > deimos:~/tip/tools/perf> make
      >   BUILD:   Doing 'make -j4' parallel build
      > make[3]: *** No rule to make target '/usr/include/x86_64-linux-gnu/sys/types.h', needed by 'fixdep.o'.  Stop.
      > Makefile:42: recipe for target 'fixdep-in.o' failed
      > make[2]: *** [fixdep-in.o] Error 2
      > /home/mingo/tip/tools/build/Makefile.include:4: recipe for target 'fixdep' failed
      > make[1]: *** [fixdep] Error 2
      > Makefile:68: recipe for target 'all' failed
      > make: *** [all] Error 2
      >
      > Now this got a bit better after I did a 'make mrproper' in the kernel tree:
      >
      > deimos:~/tip/tools/perf> make
      >   BUILD:   Doing 'make -j4' parallel build
      >   HOSTCC   fixdep.o
      > /home/mingo/tip/tools/build/fixdep: 1: /home/mingo/tip/tools/build/fixdep: Syntax error: "(" unexpected
      > /home/mingo/tip/tools/build/Makefile.build:101: recipe for target 'fixdep.o' failed
      > make[3]: *** [fixdep.o] Error 2
      > Makefile:42: recipe for target 'fixdep-in.o' failed
      > make[2]: *** [fixdep-in.o] Error 2
      > /home/mingo/tip/tools/build/Makefile.include:4: recipe for target 'fixdep' failed
      > make[1]: *** [fixdep] Error 2
      > Makefile:68: recipe for target 'all' failed
      > make: *** [all] Error 2
      >
      > After some digging it turns out that my 'fixdep' binary was 64-bit:
      >
      > deimos:~/tip/tools/perf> file /home/mingo/tip/tools/build/fixdep
      > /home/mingo/tip/tools/build/fixdep: ELF 64-bit LSB executable, x86-64, version 1
      > (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux
      > 2.6.32, BuildID[sha1]=d527f736b57b5ba47210fbcb562a3b52867d21c1, not stripped
      >
      > But it did not get cleaned out by 'make clean'.
      >
      > Only after I did a 'make clean' in tools/ itself, did it get built properly.
      
      It shows we don't clean up properly the fixdep objects, so adding
      special rule for that.
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Reported-by: NIngo Molnar <mingo@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1487340058-10496-2-git-send-email-jolsa@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      85e0d509
  3. 12 1月, 2017 1 次提交
  4. 04 1月, 2017 1 次提交
  5. 16 12月, 2016 1 次提交
  6. 11 12月, 2016 1 次提交
  7. 07 12月, 2016 3 次提交
    • J
      perf tools: Move perf build related variables under non fixdep leg · 8ac1eb7b
      Jiri Olsa 提交于
      Because there's no need for them in fixdep build.
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1481030331-31944-4-git-send-email-jolsa@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      8ac1eb7b
    • J
      perf tools: Force fixdep compilation at the start of the build · abb26210
      Jiri Olsa 提交于
      The fixdep tool needs to be built before everything else, because it fixes
      every object dependency file.
      
      We handle this currently by making all objects to depend on fixdep, which is
      error prone and is easily forgotten when new object is added.
      
      Instead of this, this patch force fixdep tool to be built as the first target
      in the separate make session. This way we don't need to handle extra fixdep
      dependencies and we are certain there's no fixdep race with any parallel make
      job.
      
      Committer notes:
      
      Testing it:
      
      Before:
      
        $ rm -rf /tmp/build/perf/ ; mkdir -p /tmp/build/perf ; make -k O=/tmp/build/perf -C tools/perf install-bin
        make: Entering directory '/home/acme/git/linux/tools/perf'
          BUILD:   Doing 'make -j4' parallel build
      
        Auto-detecting system features:
        ...                         dwarf: [ on  ]
        ...            dwarf_getlocations: [ on  ]
        ...                         glibc: [ on  ]
        ...                          gtk2: [ on  ]
        ...                      libaudit: [ on  ]
        ...                        libbfd: [ on  ]
        ...                        libelf: [ on  ]
        ...                       libnuma: [ on  ]
        ...        numa_num_possible_cpus: [ on  ]
        ...                       libperl: [ on  ]
        ...                     libpython: [ on  ]
        ...                      libslang: [ on  ]
        ...                     libcrypto: [ on  ]
        ...                     libunwind: [ on  ]
        ...            libdw-dwarf-unwind: [ on  ]
        ...                          zlib: [ on  ]
        ...                          lzma: [ on  ]
        ...                     get_cpuid: [ on  ]
        ...                           bpf: [ on  ]
      
          GEN      /tmp/build/perf/common-cmds.h
          HOSTCC   /tmp/build/perf/fixdep.o
          HOSTLD   /tmp/build/perf/fixdep-in.o
          LINK     /tmp/build/perf/fixdep
          MKDIR    /tmp/build/perf/pmu-events/
          HOSTCC   /tmp/build/perf/pmu-events/json.o
          MKDIR    /tmp/build/perf/pmu-events/
          HOSTCC   /tmp/build/perf/pmu-events/jsmn.o
          HOSTCC   /tmp/build/perf/pmu-events/jevents.o
          HOSTLD   /tmp/build/perf/pmu-events/jevents-in.o
          PERF_VERSION = 4.9.rc8.g868cd5
          CC       /tmp/build/perf/perf-read-vdso32
        <SNIP>
      
      After:
      
        $ rm -rf /tmp/build/perf/ ; mkdir -p /tmp/build/perf ; make -k O=/tmp/build/perf -C tools/perf install-bin
        make: Entering directory '/home/acme/git/linux/tools/perf'
          BUILD:   Doing 'make -j4' parallel build
          HOSTCC   /tmp/build/perf/fixdep.o
          HOSTLD   /tmp/build/perf/fixdep-in.o
          LINK     /tmp/build/perf/fixdep
      
        Auto-detecting system features:
        ...                         dwarf: [ on  ]
        ...            dwarf_getlocations: [ on  ]
        ...                         glibc: [ on  ]
        ...                          gtk2: [ on  ]
        ...                      libaudit: [ on  ]
        ...                        libbfd: [ on  ]
        ...                        libelf: [ on  ]
        ...                       libnuma: [ on  ]
        ...        numa_num_possible_cpus: [ on  ]
        ...                       libperl: [ on  ]
        ...                     libpython: [ on  ]
        ...                      libslang: [ on  ]
        ...                     libcrypto: [ on  ]
        ...                     libunwind: [ on  ]
        ...            libdw-dwarf-unwind: [ on  ]
        ...                          zlib: [ on  ]
        ...                          lzma: [ on  ]
        ...                     get_cpuid: [ on  ]
        ...                           bpf: [ on  ]
      
          GEN      /tmp/build/perf/common-cmds.h
          MKDIR    /tmp/build/perf/fd/
          CC       /tmp/build/perf/fd/array.o
          LD       /tmp/build/perf/fd/libapi-in.o
          MKDIR    /tmp/build/perf/fs/
          CC       /tmp/build/perf/event-parse.o
          CC       /tmp/build/perf/fs/fs.o
          PERF_VERSION = 4.9.rc8.g57a92f
          CC       /tmp/build/perf/event-plugin.o
          MKDIR    /tmp/build/perf/fs/
          CC       /tmp/build/perf/fs/tracing_path.o
        <SNIP>
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1481030331-31944-3-git-send-email-jolsa@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      abb26210
    • J
      perf tools: Move PERF-VERSION-FILE target into rules area · 16e2ef4e
      Jiri Olsa 提交于
      An upcoming fixdep fix needs all targets at the same area, so they'll
      fit under a signal condition block.
      
      Moving PERF-VERSION-FILE target into rules section.
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1481030331-31944-2-git-send-email-jolsa@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      16e2ef4e
  8. 06 12月, 2016 4 次提交
  9. 14 11月, 2016 1 次提交
  10. 28 10月, 2016 1 次提交
  11. 04 10月, 2016 1 次提交
    • A
      perf jevents: Program to convert JSON file · 80eeb67f
      Andi Kleen 提交于
      This is a modified version of an earlier patch by Andi Kleen.
      
      We expect architectures to create JSON files describing the performance
      monitoring (PMU) events that each CPU model/family of the architecture
      supports.
      
      Following is an example of the JSON file entry for an x86 event:
      
          	[
          	...
          	{
          	"EventCode": "0x00",
          	"UMask": "0x01",
          	"EventName": "INST_RETIRED.ANY",
          	"BriefDescription": "Instructions retired from execution.",
          	"PublicDescription": "Instructions retired from execution.",
          	"Counter": "Fixed counter 1",
          	"CounterHTOff": "Fixed counter 1",
          	"SampleAfterValue": "2000003",
          	"SampleAfterValue": "2000003",
          	"MSRIndex": "0",
          	"MSRValue": "0",
          	"TakenAlone": "0",
          	"CounterMask": "0",
          	"Invert": "0",
          	"AnyThread": "0",
          	"EdgeDetect": "0",
          	"PEBS": "0",
          	"PRECISE_STORE": "0",
          	"Errata": "null",
          	"Offcore": "0"
          	},
          	...
      
          	]
      
      All the PMU events supported by a CPU model/family must be grouped into
      "topics" such as "Pipelining", "Floating-point", "Virtual-memory" etc.
      
      All events belonging to a topic must be placed in a separate JSON file
      (eg: "Pipelining.json") and all the topic JSON files for a CPU model must
      be in a separate directory.
      
      	Eg: for the CPU model "Silvermont_core":
      
          	$ ls tools/perf/pmu-events/arch/x86/Silvermont_core
          	Floating-point.json
          	Memory.json
          	Other.json
          	Pipelining.json
          	Virtualmemory.json
      
      Finally, to allow multiple CPU models to share a single set of JSON files,
      architectures must provide a mapping between a model and its set of events:
      
          	$ grep Silvermont tools/perf/pmu-events/arch/x86/mapfile.csv
          	GenuineIntel-6-4D,V13,Silvermont_core,core
          	GenuineIntel-6-4C,V13,Silvermont_core,core
      
      which maps each CPU, identified by [vendor, family, model, version, type]
      to a directory of JSON files. Thus two (or more) CPU models support the
      set of PMU events listed in the directory.
      
          	tools/perf/pmu-events/arch/x86/Silvermont_core/
      
      Given this organization of files, the program, jevents:
      
      	- locates all JSON files for each CPU-model of the architecture,
      
      	- parses all JSON files for the CPU-model and generates a C-style
      	  "PMU-events table" (pmu-events.c) for the model
      
      	- locates a mapfile for the architecture
      
      	- builds a global table, mapping each model of CPU to the corresponding
      	  PMU-events table.
      
      The 'pmu-events.c' is generated when building perf and added to libperf.a.
      The global table pmu_events_map[] table in this pmu-events.c will be used
      in perf in a follow-on patch.
      
      If the architecture does not have any JSON files or there is an error in
      processing them, an empty mapping file is created. This would allow the
      build of perf to proceed even if we are not able to provide aliases for
      events.
      
      The parser for JSON files allows parsing Intel style JSON event files. This
      allows to use an Intel event list directly with perf. The Intel event lists
      can be quite large and are too big to store in unswappable kernel memory.
      
      The conversion from JSON to C-style is straight forward.  The parser knows
      (very little) Intel specific information, and can be easily extended to
      handle fields for other CPUs.
      
      The parser code is partially shared with an independent parsing library,
      which is 2-clause BSD licensed. To avoid any conflicts I marked those
      files as BSD licensed too. As part of perf they become GPLv2.
      
      Committer notes:
      
      Fixes:
      
      1) Limit maxfds to 512 to avoid nftd() segfaulting on alloca() with a
         big rlim_max, as in docker containers - acme
      
      2) Make jevents a hostprog, supporting cross compilation - jolsa
      
      3) Use HOSTCC for jevents final step - acme
      
      4) Define _GNU_SOURCE for asprintf, as we can't use CC's EXTRA_CFLAGS,
        that has to have --sysroot on the Android NDK 24 - acme
      
      5) Removed $(srctree)/tools/perf/pmu-events/pmu-events.c from the
         'clean' target, it is generated on $(OUTPUT)pmu-events/pmu-events.c,
         which is already taken care of in the original patch - acme
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Signed-off-by: NSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: NIngo Molnar <mingo@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      Link: http://lkml.kernel.org/r/1473978296-20712-3-git-send-email-sukadev@linux.vnet.ibm.com
      Link: http://lkml.kernel.org/r/20160927141846.GA6589@kravaSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      80eeb67f
  12. 14 9月, 2016 1 次提交
  13. 24 8月, 2016 2 次提交
  14. 03 8月, 2016 1 次提交
  15. 19 7月, 2016 2 次提交
  16. 14 7月, 2016 1 次提交
  17. 13 7月, 2016 5 次提交
  18. 23 6月, 2016 1 次提交
    • H
      perf tools: Let python use correct gcc for build_ext · 48d8d5db
      He Kuang 提交于
      Currently, python uses host gcc instead of cross-compile gcc in the last
      step of compiling build_ext(remove '--quiet' to show verbose):
      
        cross-gcc ...
        cross-gcc ...
        creating ~/out/python_ext_build/lib
        gcc -pthread -shared -Wl,-z ...
      
      This is wrong but may not cause any errors unless the features detected
      by cross-compiler do not match those for host compiler, and causes the
      following errors:
      
        /usr/lib64/gcc/bin/ld: cannot find -lunwind-x86
        collect2: error: ld returned 1 exit status
        error: command 'gcc' failed with exit status 1
        cp: cannot stat ‘~/out/python_ext_build/lib/perf.so’: No such file or directory
        Makefile.perf:257: recipe for target '~/out/python/perf.so' failed
        make[1]: *** [~/out/python/perf.so] Error 1
        Makefile:68: recipe for target 'all' failed
        make: *** [all] Error 2
      
      This issue is also reported and anwsered on stackoverflow.
      Link: http://stackoverflow.com/questions/5986256/python-distutils-gcc-pathSigned-off-by: NHe Kuang <hekuang@huawei.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ekaterina Tumanova <tumanova@linux.vnet.ibm.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Pekka Enberg <penberg@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/r/1466578626-92406-5-git-send-email-hekuang@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      48d8d5db
  19. 08 4月, 2016 1 次提交
    • A
      perf tools: Build syscall table .c header from kernel's syscall_64.tbl · 1b700c99
      Arnaldo Carvalho de Melo 提交于
      We used libaudit to map ids to syscall names and vice-versa, but that
      imposes a delay in supporting new syscalls, having to wait for libaudit
      to get those new syscalls on its tables.
      
      To remove that delay, for x86_64 initially, grab a copy of
      arch/x86/entry/syscalls/syscall_64.tbl and use it to generate those
      tables.
      
      Syscalls currently not available in audit-libs:
      
        # trace -e copy_file_range,membarrier,mlock2,pread64,pwrite64,timerfd_create,userfaultfd
        Error:	Invalid syscall copy_file_range, membarrier, mlock2, pread64, pwrite64, timerfd_create, userfaultfd
        Hint:	try 'perf list syscalls:sys_enter_*'
        Hint:	and: 'man syscalls'
        #
      
      With this patch:
      
        # trace -e copy_file_range,membarrier,mlock2,pread64,pwrite64,timerfd_create,userfaultfd
          8505.733 ( 0.010 ms): gnome-shell/2519 timerfd_create(flags: 524288) = 36
          8506.688 ( 0.005 ms): gnome-shell/2519 timerfd_create(flags: 524288) = 40
         30023.097 ( 0.025 ms): qemu-system-x8/24629 pwrite64(fd: 18, buf: 0x7f63ae382000, count: 4096, pos: 529592320) = 4096
         31268.712 ( 0.028 ms): qemu-system-x8/24629 pwrite64(fd: 18, buf: 0x7f63afd8b000, count: 4096, pos: 2314133504) = 4096
         31268.854 ( 0.016 ms): qemu-system-x8/24629 pwrite64(fd: 18, buf: 0x7f63afda2000, count: 4096, pos: 2314137600) = 4096
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-51xfjbxevdsucmnbc4ka5r88@git.kernel.org
      [ Added make dep for 'prepare' in 'LIBPERF_IN', fix by Wang Nan to fix parallell build ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1b700c99
  20. 06 4月, 2016 1 次提交
  21. 19 3月, 2016 1 次提交
  22. 12 2月, 2016 1 次提交
  23. 05 2月, 2016 1 次提交
  24. 27 1月, 2016 1 次提交
  25. 26 1月, 2016 1 次提交
    • W
      perf test: Add libbpf relocation checker · 7b6982ce
      Wang Nan 提交于
      There's a bug in LLVM that it can generate unneeded relocation
      information. See [1] and [2]. Libbpf should check the target section of
      a relocation symbol.
      
      This patch adds a testcase which references a global variable (BPF
      doesn't support global variables). Before fixing libbpf, the new test
      case can be loaded into kernel, the global variable acts like the first
      map. It is incorrect.
      
      Result:
      
        # ~/perf test BPF
        37: Test BPF filter                                          :
        37.1: Test basic BPF filtering                               : Ok
        37.2: Test BPF prologue generation                           : Ok
        37.3: Test BPF relocation checker                            : FAILED!
      
        # ~/perf test -v BPF
        ...
        libbpf: loading object '[bpf_relocation_test]' from buffer
        libbpf: section .strtab, size 126, link 0, flags 0, type=3
        libbpf: section .text, size 0, link 0, flags 6, type=1
        libbpf: section .data, size 0, link 0, flags 3, type=1
        libbpf: section .bss, size 0, link 0, flags 3, type=8
        libbpf: section func=sys_write, size 104, link 0, flags 6, type=1
        libbpf: found program func=sys_write
        libbpf: section .relfunc=sys_write, size 16, link 10, flags 0, type=9
        libbpf: section maps, size 16, link 0, flags 3, type=1
        libbpf: maps in [bpf_relocation_test]: 16 bytes
        libbpf: section license, size 4, link 0, flags 3, type=1
        libbpf: license of [bpf_relocation_test] is GPL
        libbpf: section version, size 4, link 0, flags 3, type=1
        libbpf: kernel version of [bpf_relocation_test] is 40400
        libbpf: section .symtab, size 144, link 1, flags 0, type=2
        libbpf: map 0 is "my_table"
        libbpf: collecting relocating info for: 'func=sys_write'
        libbpf: relocation: insn_idx=7
        Success unexpectedly: libbpf error when dealing with relocation
        test child finished with -1
        ---- end ----
        Test BPF filter subtest 2: FAILED!
      
      [1] https://llvm.org/bugs/show_bug.cgi?id=26243
      [2] https://patchwork.ozlabs.org/patch/571385/Signed-off-by: NWang Nan <wangnan0@huawei.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: He Kuang <hekuang@huawei.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Li Zefan <lizefan@huawei.com>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/r/1453715801-7732-2-git-send-email-wangnan0@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      7b6982ce
  26. 16 1月, 2016 2 次提交
  27. 09 1月, 2016 1 次提交
    • N
      perf report: Show random usage tip on the help line · 14cbfbeb
      Namhyung Kim 提交于
      Currently perf report only shows a help message "For a higher level
      overview, try: perf report --sort comm,dso" unconditionally (even if
      the sort keys were used).  Add more help tips and show randomly.
      
      Load tips from ${prefix}/share/doc/perf-tip/tips.txt file.
      
        $ perf report | tail
            0.10%  swapper  [kernel.vmlinux]   [k] irq_exit
            0.09%  swapper  [kernel.vmlinux]   [k] flush_smp_call_function_queue
            0.08%  swapper  [kernel.vmlinux]   [k] native_write_msr_safe
            0.03%  swapper  [kernel.vmlinux]   [k] group_sched_in
            0.01%  perf     [kernel.vmlinux]   [k] native_write_msr_safe
      
        #
        # (Tip: Search options using a keyword: perf report -h <keyword>)
        #
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Acked-by: NIngo Molnar <mingo@kernel.org>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/r/1452166913-27046-1-git-send-email-namhyung@kernel.org
      [ Renamed it to perf_tip() and the parameter dirname to dirpath to fix the build on older distros ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      14cbfbeb
  28. 08 1月, 2016 1 次提交