1. 03 Aug, 2022 1 commit
  2. 02 Aug, 2022 8 commits
    • Namhyung Kim's avatar
      perf lock: Print the number of lost entries for BPF · 6d499a6b
      Namhyung Kim authored
      Like the normal 'perf lock contention' output, it'd print the number of
      lost entries for BPF if exists or -v option is passed.
      
      Currently it uses BROKEN_CONTENDED stat for the lost count (due to full
      stack maps).
      
        $ sudo perf lock con -a -b --map-nr-entries 128 sleep 5
        ...
        === output for debug===
      
        bad: 43, total: 14903
        bad rate: 0.29 %
        histogram of events caused bad sequence
            acquire: 0
           acquired: 0
          contended: 43
            release: 0
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Blake Jones <blakejones@google.com>
      Cc: Boqun Feng <boqun.feng@gmail.com>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: Waiman Long <longman@redhat.com>
      Cc: Will Deacon <will@kernel.org>
      Link: https://lore.kernel.org/r/20220802191004.347740-3-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6d499a6b
    • Namhyung Kim's avatar
      perf lock: Add --map-nr-entries option · ceb13bfc
      Namhyung Kim authored
      The --map-nr-entries option is to control number of max entries in the
      perf lock contention BPF maps.
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Blake Jones <blakejones@google.com>
      Cc: Boqun Feng <boqun.feng@gmail.com>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: Waiman Long <longman@redhat.com>
      Cc: Will Deacon <will@kernel.org>
      Link: https://lore.kernel.org/r/20220802191004.347740-2-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ceb13bfc
    • Namhyung Kim's avatar
      perf lock: Introduce struct lock_contention · 447ec4e5
      Namhyung Kim authored
      The lock_contention struct is to carry related fields together and to
      minimize the change when we add new config options.
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Blake Jones <blakejones@google.com>
      Cc: Boqun Feng <boqun.feng@gmail.com>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: Waiman Long <longman@redhat.com>
      Cc: Will Deacon <will@kernel.org>
      Link: https://lore.kernel.org/r/20220802191004.347740-1-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      447ec4e5
    • Arnaldo Carvalho de Melo's avatar
      perf scripting python: Do not build fail on deprecation warnings · 4ee3c4da
      Arnaldo Carvalho de Melo authored
      First noticed with fedora:rawhide:
      
        48    11.10 fedora:rawhide                : FAIL gcc version 12.1.1 20220628 (Red Hat 12.1.1-3) (GCC)
          util/scripting-engines/trace-event-python.c: In function 'python_start_script':
          util/scripting-engines/trace-event-python.c:1899:9: error: 'PySys_SetArgv' is deprecated [-Werror=deprecated-declarations]
           1899 |         PySys_SetArgv(argc + 1, command_line);
      
      No time now to address this warning, so don't make it an error, in time
      we should either add yet more ifdefs to continue supporting older
      systems or just convert to whatever new infra python put in place for
      argv processing, sigh.
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4ee3c4da
    • Arnaldo Carvalho de Melo's avatar
      genelf: Use HAVE_LIBCRYPTO_SUPPORT, not the never defined HAVE_LIBCRYPTO · 91cea6be
      Arnaldo Carvalho de Melo authored
      When genelf was introduced it tested for HAVE_LIBCRYPTO not
      HAVE_LIBCRYPTO_SUPPORT, which is the define the feature test for openssl
      defines, fix it.
      
      This also adds disables the deprecation warning, someone has to fix this
      to build with openssl 3.0 before the warning becomes a hard error.
      
      Fixes: 9b07e27f ("perf inject: Add jitdump mmap injection support")
      Reported-by: default avatar谭梓煊 <tanzixuan.me@gmail.com>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Andrii Nakryiko <andrii@kernel.org>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Fastabend <john.fastabend@gmail.com>
      Cc: KP Singh <kpsingh@kernel.org>
      Cc: Martin KaFai Lau <kafai@fb.com>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lore.kernel.org/lkml/YulpPqXSOG0Q4J1o@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      91cea6be
    • Zixuan Tan's avatar
      perf build: Suppress openssl v3 deprecation warnings in libcrypto feature test · 10fef869
      Zixuan Tan authored
      With OpenSSL v3 installed, the libcrypto feature check fails as it use the
      deprecated MD5_* API (and is compiled with -Werror). The error message is
      as follows.
      
      $ make tools/perf
      ```
      Makefile.config:778: No libcrypto.h found, disables jitted code injection,
      please install openssl-devel or libssl-dev
      
      Auto-detecting system features:
      ...                         dwarf: [ on  ]
      ...            dwarf_getlocations: [ on  ]
      ...                         glibc: [ on  ]
      ...                        libbfd: [ on  ]
      ...                libbfd-buildid: [ on  ]
      ...                        libcap: [ on  ]
      ...                        libelf: [ on  ]
      ...                       libnuma: [ on  ]
      ...        numa_num_possible_cpus: [ on  ]
      ...                       libperl: [ on  ]
      ...                     libpython: [ on  ]
      ...                     libcrypto: [ OFF ]
      ...                     libunwind: [ on  ]
      ...            libdw-dwarf-unwind: [ on  ]
      ...                          zlib: [ on  ]
      ...                          lzma: [ on  ]
      ...                     get_cpuid: [ on  ]
      ...                           bpf: [ on  ]
      ...                        libaio: [ on  ]
      ...                       libzstd: [ on  ]
      ...        disassembler-four-args: [ on  ]
      ```
      
      This is very confusing because the suggested library (on my Ubuntu 20.04
      it is libssl-dev) is already installed. As the test only checks for the
      presence of libcrypto, this commit suppresses the deprecation warning to
      allow the test to pass.
      Signed-off-by: default avatarZixuan Tan <tanzixuan.me@gmail.com>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Andrii Nakryiko <andrii@kernel.org>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: John Fastabend <john.fastabend@gmail.com>
      Cc: KP Singh <kpsingh@kernel.org>
      Cc: Martin KaFai Lau <kafai@fb.com>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: Yonghong Song <yhs@fb.com>
      Cc: bpf@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Link: https://lore.kernel.org/r/20220625153439.513559-1-tanzixuan.me@gmail.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      10fef869
    • Ian Rogers's avatar
      perf parse-events: Break out tracepoint and printing · 9b7c7728
      Ian Rogers authored
      Move print_*_events functions out of parse-events.c into a new
      print-events.c. Move tracepoint code into tracepoint.c or
      trace-event-info.c (sole user). This reduces the dependencies of
      parse-events.c and makes it more amenable to being a library in the
      future.
      
      Remove some unnecessary definitions from parse-events.h. Fix a
      checkpatch.pl warning on using unsigned rather than unsigned int.  Fix
      some line length warnings too.
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https://lore.kernel.org/r/20220729204217.250166-3-irogers@google.com
      [ Add include linux/stddef.h before perf_events.h for systems where __always_inline isn't pulled in before used, such as older Alpine Linux ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      9b7c7728
    • Ian Rogers's avatar
      perf parse-events: Don't #define YY_EXTRA_TYPE · 32f457ab
      Ian Rogers authored
      Adding a #define to side-effect a local include isn't clean, for
      example, it inhibits header precompilation. YY_EXTRA_TYPE is
      defined to be void* by default, so just remove.
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https://lore.kernel.org/r/20220729204217.250166-2-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      32f457ab
  3. 01 Aug, 2022 18 commits
  4. 31 Jul, 2022 6 commits
  5. 30 Jul, 2022 2 commits
  6. 29 Jul, 2022 5 commits