1. 18 Aug, 2016 1 commit
    • Vineet Gupta's avatar
      tools lib: Reinstate strlcpy() header guard with __UCLIBC__ · 0215d59b
      Vineet Gupta authored
      perf tools build in recent kernels spews splat when cross compiling with uClibc:
      
      |   CC       util/alias.o
      | In file included from tools/perf/util/../ui/../util/cache.h:8:0,
      |                 from tools/perf/util/../ui/helpline.h:7,
      |                 from tools/perf/util/debug.h:8,
      |                 from arch/../util/cpumap.h:9,
      |                 from arch/../util/env.h:5,
      |                 from arch/common.h:4,
      |                 from arch/common.c:3:
      | tools/include/linux/string.h:12:15: warning: redundant redeclaration of ‘strlcpy’ [-Wredundant-decls]
      |  extern size_t strlcpy(char *dest, const char *src, size_t size);
                     ^
      This is after commit 61a6445e ("tools lib: Guard the strlcpy() header with
      __GLIBC__").
      
      The problem is uClibc also defines __GLIBC__ for exported headers for
      applications. So add that specific check to not trip for uClibc.
      Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Petri Gynther <pgynther@google.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Cc: linux-snps-arc@lists.infradead.org
      Link: http://lkml.kernel.org/r/1471537703-16439-1-git-send-email-vgupta@synopsys.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0215d59b
  2. 09 Aug, 2016 1 commit
    • Arnaldo Carvalho de Melo's avatar
      toops: Sync tools/include/uapi/linux/bpf.h with the kernel · 791cceb8
      Arnaldo Carvalho de Melo authored
      The way we're using kernel headers in tools/ now, with a copy that is
      made to the same path prefixed by "tools/" plus checking if that copy
      got stale, i.e. if the kernel counterpart changed, helps in keeping
      track with new features that may be useful for tools to exploit.
      
      For instance, looking at all the changes to bpf.h since it was last
      copied to tools/include brings this to toolers' attention:
      
      Need to investigate this one to check how to run a program via perf, setting up
      a BPF event, that will take advantage of the way perf already calls clang/LLVM,
      sets up the event and runs the workload in a single command line, helping in
      debugging such semi cooperative programs:
      
        96ae5227 ("bpf: Add bpf_probe_write_user BPF helper to be called in tracers")
      
      This one needs further investigation about using the feature it improves
      in 'perf trace' to do some tcpdumpin' mixed with syscalls, tracepoints,
      probe points, callgraphs, etc:
      
        555c8a86 ("bpf: avoid stack copy and use skb ctx for event output")
      
      Add tracing just packets that are related to some container to that mix:
      
        4a482f34 ("cgroup: bpf: Add bpf_skb_in_cgroup_proto")
        4ed8ec52 ("cgroup: bpf: Add BPF_MAP_TYPE_CGROUP_ARRAY")
      
      Definetely needs to have example programs accessing task_struct from a bpf proggie
      started from 'perf trace':
      
        606274c5 ("bpf: introduce bpf_get_current_task() helper")
      
      Core networking related, XDP:
      
        6ce96ca3 ("bpf: add XDP_TX xdp_action for direct forwarding")
        6a773a15 ("bpf: add XDP prog type for early driver filter")
        13c5c240 ("bpf: add bpf_get_hash_recalc helper")
        d2485c42 ("bpf: add bpf_skb_change_type helper")
        6578171a ("bpf: add bpf_skb_change_proto helper")
      
      Changes detected by the tools build system:
      
        $ make -C tools/perf O=/tmp/build/perf install-bin
        make: Entering directory '/home/acme/git/linux/tools/perf'
          BUILD:   Doing 'make -j4' parallel build
        Warning: tools/include/uapi/linux/bpf.h differs from kernel
          INSTALL  GTK UI
          CC       /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o
        <SNIP>
        $
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexei Starovoitov <ast@fb.com>
      Cc: Brenden Blanco <bblanco@plumgrid.com>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Martin KaFai Lau <kafai@fb.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Sargun Dhillon <sargun@sargun.me>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-difq4ts1xvww6eyfs9e7zlft@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      791cceb8
  3. 02 Aug, 2016 3 commits
  4. 18 Jul, 2016 2 commits
  5. 15 Jul, 2016 1 commit
  6. 14 Jul, 2016 1 commit
  7. 13 Jul, 2016 2 commits
  8. 12 Jul, 2016 8 commits
  9. 23 Mar, 2016 1 commit
  10. 09 Mar, 2016 1 commit
    • Josh Poimboeuf's avatar
      tools: Copy hashtable.h into tools directory · 1698872b
      Josh Poimboeuf authored
      Copy hashtable.h from include/linux/tools.h.  It's needed by objtool in
      the next patch in the series.
      
      Add some includes that it needs, and remove references to
      kernel-specific features like RCU and __read_mostly.
      
      Also change some if its dependency headers' includes to use quotes
      instead of brackets so gcc can find them.
      Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Bernd Petrovitsch <bernd@petrovitsch.priv.at>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Chris J Arges <chris.j.arges@canonical.com>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Michal Marek <mmarek@suse.cz>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Pedro Alves <palves@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: live-patching@vger.kernel.org
      Link: http://lkml.kernel.org/r/be3bef72f6540d8a510515408119d968a0e18179.1457502970.git.jpoimboe@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      1698872b
  11. 12 Jan, 2016 1 commit
    • Josh Poimboeuf's avatar
      tools: Make list.h self-sufficient · d1b39d41
      Josh Poimboeuf authored
      Commit 7f5f873c ("rculist: Use WRITE_ONCE() when deleting from
      reader-visible list") added the use of the WRITE_ONCE macro to the
      kernel version of list.h, which broke the stacktool build because the
      tools list.h includes the kernel list.h.
      
      Avoid this type of situation in the future and make list.h
      self-sufficient by copying the kernel list.h routines directly into
      tools list.h.
      
      This is a straight copy except for adjustments to the include statements
      and copying of the tools-specific list routines (list_del_range and
      list_for_each_from).
      Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Bernd Petrovitsch <bernd@petrovitsch.priv.at>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Chris J Arges <chris.j.arges@canonical.com>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Michal Marek <mmarek@suse.cz>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Pedro Alves <palves@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: live-patching@vger.kernel.org
      Cc: x86@kernel.org
      Link: http://lkml.kernel.org/r/59cdc19c6589d1b5ef43d83b0e2d5a4a40301374.1450442274.git.jpoimboe@redhat.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d1b39d41
  12. 08 Jan, 2016 1 commit
  13. 16 Dec, 2015 1 commit
  14. 18 Nov, 2015 2 commits
  15. 11 Nov, 2015 1 commit
  16. 13 Oct, 2015 1 commit
    • Jiri Olsa's avatar
      tools include: Fix strict-aliasing rules breakage · c95f3432
      Jiri Olsa authored
      Vinson reported build breakage with gcc 4.4 due to strict-aliasing.
      
         CC       util/annotate.o
       cc1: warnings being treated as errors
       util/annotate.c: In function ‘disasm__purge’:
       linux-next/tools/include/linux/compiler.h:66: error: dereferencing
       pointer ‘res.41’ does break strict-aliasing rules
      
      The reason is READ_ONCE/WRITE_ONCE code we took from kernel sources.  They
      intentionaly break aliasing rules. While this is ok for kernel because it's
      built with -fno-strict-aliasing, it breaks perf which is build with
      -Wstrict-aliasing=3.
      
      Using extra __may_alias__ type to allow aliasing in this case.
      Reported-and-tested-by: default avatarVinson Lee <vlee@twopensource.com>
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Martin Liska <mliska@suse.cz>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Rabin Vincent <rabin@rab.in>
      Cc: linux-next@vger.kernel.org
      Link: http://lkml.kernel.org/r/20151013085214.GB2705@krava.brq.redhat.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c95f3432
  17. 30 Sep, 2015 1 commit
  18. 15 Sep, 2015 1 commit
  19. 02 Sep, 2015 1 commit
    • He Kuang's avatar
      perf tools: Copy linux/filter.h to tools/include · dabf626f
      He Kuang authored
      This patch copies filter.h from include/linux/kernel.h to
      tools/include/linux/filter.h to enable other libraries to use macros in it,
      like libbpf which will be introduced by further patches.
      
      Currently, the filter.h copy only contains the useful macros needed by
      libbpf for not introducing too much dependence.
      
      tools/perf/MANIFEST is also updated for 'make perf-*-src-pkg'.
      
      One change:
        The 'imm' field of BPF_EMIT_CALL becomes ((FUNC) - BPF_FUNC_unspec) to
        suit user space code generator.
      Signed-off-by: default avatarHe Kuang <hekuang@huawei.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Alexei Starovoitov <ast@plumgrid.com>
      Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kaixu Xia <xiakaixu@huawei.com>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Wang Nan <wangnan0@huawei.com>
      Cc: Zefan Li <lizefan@huawei.com>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/r/1440822125-52691-22-git-send-email-wangnan0@huawei.comSigned-off-by: default avatarWang Nan <wangnan0@huawei.com>
      [ Removed stylistic changes, so that a diff to the original file gets reduced ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      dabf626f
  20. 25 Aug, 2015 1 commit
  21. 05 Jul, 2015 4 commits
  22. 02 Jun, 2015 2 commits
  23. 18 May, 2015 1 commit
  24. 08 May, 2015 1 commit