1. 12 Jul, 2024 8 commits
  2. 11 Jul, 2024 1 commit
  3. 04 Jul, 2024 1 commit
  4. 03 Jul, 2024 4 commits
  5. 02 Jul, 2024 4 commits
  6. 28 Jun, 2024 7 commits
  7. 26 Jun, 2024 9 commits
    • Veronika Molnarova's avatar
      perf test stat_bpf_counter.sh: Stabilize the test results · e8b86f03
      Veronika Molnarova authored
      The test has been failing for some time when two separate runs of
      perf benchmarks are recorded for cycles events and their counts are
      compared, while once the recording was done with option --bpf-counters
      and once without it. It is expected that the count of the samples
      should be within a certain range, firstly the difference was set to be
      within 10%, which was then later raised to 20%. However, the test case
      keeps failing on certain architectures as recording the provided
      benchmark can produce completely different counts based on the
      current load of the system.
      
      Sampling two separate runs on intel-eaglestream-spr-13 of "perf stat
      --no-big-num -e cycles -- perf bench sched messaging -g 1 -l 100 -t":
      
       Performance counter stats for 'perf bench sched messaging -g 1 -l 100 -t':
      
               396782898      cycles
      
             0.010051983 seconds time elapsed
      
             0.008664000 seconds user
             0.097058000 seconds sys
      
       Performance counter stats for 'perf bench sched messaging -g 1 -l 100 -t':
      
              1431133032      cycles
      
             0.021803714 seconds time elapsed
      
             0.023377000 seconds user
             0.349918000 seconds sys
      
      , which is ranging from 400mil to 1400mil samples.
      
      Instead of recording the cycles use instructions event, which provides
      more stable values. At the same time change the tested workload to one
      of the provided testing workloads by perf that is not based on a
      scheduler, which can provide another dependency on the current load.
      
      Sampling instructions event with the new workload provide much more
      stable results on intel-eaglestream-spr-13 of "perf stat --no-big-num
      -e instructions -- perf test -w brstack":
      
       Performance counter stats for 'perf test -w brstack':
      
                64584494      instructions
      
             0.009173945 seconds time elapsed
      
             0.007262000 seconds user
             0.002071000 seconds sys
      
       Performance counter stats for 'perf test -w brstack':
      
                64672669      instructions
      
             0.008888135 seconds time elapsed
      
             0.005018000 seconds user
             0.004018000 seconds sys
      Signed-off-by: default avatarVeronika Molnarova <vmolnaro@redhat.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: mpetlan@redhat.com
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/r/20240625092001.10909-1-vmolnaro@redhat.com
      e8b86f03
    • Ian Rogers's avatar
      perf python: Clean up build dependencies · e4b19e2c
      Ian Rogers authored
      The python build now depends on libraries and doesn't use
      python-ext-sources except for the util/python.c dependency. Switch to
      just directly depending on that file and util/setup.py. This allows
      the removal of python-ext-sources.
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Albert Ou <aou@eecs.berkeley.edu>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Gary Guo <gary@garyguo.net>
      Cc: Alex Gaynor <alex.gaynor@gmail.com>
      Cc: Boqun Feng <boqun.feng@gmail.com>
      Cc: Wedson Almeida Filho <wedsonaf@gmail.com>
      Cc: Ze Gao <zegao2021@gmail.com>
      Cc: Alice Ryhl <aliceryhl@google.com>
      Cc: Andrei Vagin <avagin@google.com>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Miguel Ojeda <ojeda@kernel.org>
      Cc: Will Deacon <will@kernel.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: John Garry <john.g.garry@oracle.com>
      Cc: Benno Lossin <benno.lossin@proton.me>
      Cc: Björn Roy Baron <bjorn3_gh@protonmail.com>
      Cc: Andreas Hindborg <a.hindborg@samsung.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/r/20240625214117.953777-9-irogers@google.com
      e4b19e2c
    • Ian Rogers's avatar
      perf python: Switch module to linking libraries from building source · 9dabf400
      Ian Rogers authored
      setup.py was building most perf sources causing setup.py to mimic the
      Makefile logic as well as flex/bison code to be stubbed out, due to
      complexity building. By using libraries fewer functions are stubbed
      out, the build is faster and the Makefile logic is reused which should
      simplify updating. The libraries are passed through LDFLAGS to avoid
      complexity in python.
      
      Force the -fPIC flag for libbpf.a to ensure it is suitable for linking
      into the perf python module.
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Albert Ou <aou@eecs.berkeley.edu>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Gary Guo <gary@garyguo.net>
      Cc: Alex Gaynor <alex.gaynor@gmail.com>
      Cc: Boqun Feng <boqun.feng@gmail.com>
      Cc: Wedson Almeida Filho <wedsonaf@gmail.com>
      Cc: Ze Gao <zegao2021@gmail.com>
      Cc: Alice Ryhl <aliceryhl@google.com>
      Cc: Andrei Vagin <avagin@google.com>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Miguel Ojeda <ojeda@kernel.org>
      Cc: Will Deacon <will@kernel.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: John Garry <john.g.garry@oracle.com>
      Cc: Benno Lossin <benno.lossin@proton.me>
      Cc: Björn Roy Baron <bjorn3_gh@protonmail.com>
      Cc: Andreas Hindborg <a.hindborg@samsung.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/r/20240625214117.953777-8-irogers@google.com
      9dabf400
    • Ian Rogers's avatar
      perf util: Make util its own library · e467705a
      Ian Rogers authored
      Make the util directory into its own library. This is done to avoid
      compiling code twice, once for the perf tool and once for the perf
      python module. For convenience:
        arch/common.c
        scripts/perl/Perf-Trace-Util/Context.c
        scripts/python/Perf-Trace-Util/Context.c
      are made part of this library.
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Albert Ou <aou@eecs.berkeley.edu>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Gary Guo <gary@garyguo.net>
      Cc: Alex Gaynor <alex.gaynor@gmail.com>
      Cc: Boqun Feng <boqun.feng@gmail.com>
      Cc: Wedson Almeida Filho <wedsonaf@gmail.com>
      Cc: Ze Gao <zegao2021@gmail.com>
      Cc: Alice Ryhl <aliceryhl@google.com>
      Cc: Andrei Vagin <avagin@google.com>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Miguel Ojeda <ojeda@kernel.org>
      Cc: Will Deacon <will@kernel.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: John Garry <john.g.garry@oracle.com>
      Cc: Benno Lossin <benno.lossin@proton.me>
      Cc: Björn Roy Baron <bjorn3_gh@protonmail.com>
      Cc: Andreas Hindborg <a.hindborg@samsung.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/r/20240625214117.953777-7-irogers@google.com
      e467705a
    • Ian Rogers's avatar
      perf bench: Make bench its own library · 21cc3bc0
      Ian Rogers authored
      Make the benchmark code into a library so it may be linked against
      things like the python module to avoid compiling code twice.
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Albert Ou <aou@eecs.berkeley.edu>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Gary Guo <gary@garyguo.net>
      Cc: Alex Gaynor <alex.gaynor@gmail.com>
      Cc: Boqun Feng <boqun.feng@gmail.com>
      Cc: Wedson Almeida Filho <wedsonaf@gmail.com>
      Cc: Ze Gao <zegao2021@gmail.com>
      Cc: Alice Ryhl <aliceryhl@google.com>
      Cc: Andrei Vagin <avagin@google.com>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Miguel Ojeda <ojeda@kernel.org>
      Cc: Will Deacon <will@kernel.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: John Garry <john.g.garry@oracle.com>
      Cc: Benno Lossin <benno.lossin@proton.me>
      Cc: Björn Roy Baron <bjorn3_gh@protonmail.com>
      Cc: Andreas Hindborg <a.hindborg@samsung.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/r/20240625214117.953777-6-irogers@google.com
      21cc3bc0
    • Ian Rogers's avatar
      perf test: Make tests its own library · 1dad99af
      Ian Rogers authored
      Make the tests code its own library. This is done to avoid compiling
      code twice, once for the perf tool and once for the perf python
      module.
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Albert Ou <aou@eecs.berkeley.edu>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Gary Guo <gary@garyguo.net>
      Cc: Alex Gaynor <alex.gaynor@gmail.com>
      Cc: Boqun Feng <boqun.feng@gmail.com>
      Cc: Wedson Almeida Filho <wedsonaf@gmail.com>
      Cc: Ze Gao <zegao2021@gmail.com>
      Cc: Alice Ryhl <aliceryhl@google.com>
      Cc: Andrei Vagin <avagin@google.com>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Miguel Ojeda <ojeda@kernel.org>
      Cc: Will Deacon <will@kernel.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: John Garry <john.g.garry@oracle.com>
      Cc: Benno Lossin <benno.lossin@proton.me>
      Cc: Björn Roy Baron <bjorn3_gh@protonmail.com>
      Cc: Andreas Hindborg <a.hindborg@samsung.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/r/20240625214117.953777-5-irogers@google.com
      1dad99af
    • Ian Rogers's avatar
      perf pmu-events: Make pmu-events a library · 49f4ac4b
      Ian Rogers authored
      Make pmu-events into a library so it may be linked against things like
      the python module and not built from source.
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Albert Ou <aou@eecs.berkeley.edu>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Gary Guo <gary@garyguo.net>
      Cc: Alex Gaynor <alex.gaynor@gmail.com>
      Cc: Boqun Feng <boqun.feng@gmail.com>
      Cc: Wedson Almeida Filho <wedsonaf@gmail.com>
      Cc: Ze Gao <zegao2021@gmail.com>
      Cc: Alice Ryhl <aliceryhl@google.com>
      Cc: Andrei Vagin <avagin@google.com>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Miguel Ojeda <ojeda@kernel.org>
      Cc: Will Deacon <will@kernel.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: John Garry <john.g.garry@oracle.com>
      Cc: Benno Lossin <benno.lossin@proton.me>
      Cc: Björn Roy Baron <bjorn3_gh@protonmail.com>
      Cc: Andreas Hindborg <a.hindborg@samsung.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/r/20240625214117.953777-4-irogers@google.com
      49f4ac4b
    • Ian Rogers's avatar
      perf ui: Make ui its own library · 39f3ce5c
      Ian Rogers authored
      Make the ui code its own library. This is done to avoid compiling code
      twice, once for the perf tool and once for the perf python module.
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Albert Ou <aou@eecs.berkeley.edu>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Gary Guo <gary@garyguo.net>
      Cc: Alex Gaynor <alex.gaynor@gmail.com>
      Cc: Boqun Feng <boqun.feng@gmail.com>
      Cc: Wedson Almeida Filho <wedsonaf@gmail.com>
      Cc: Ze Gao <zegao2021@gmail.com>
      Cc: Alice Ryhl <aliceryhl@google.com>
      Cc: Andrei Vagin <avagin@google.com>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Miguel Ojeda <ojeda@kernel.org>
      Cc: Will Deacon <will@kernel.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: John Garry <john.g.garry@oracle.com>
      Cc: Benno Lossin <benno.lossin@proton.me>
      Cc: Björn Roy Baron <bjorn3_gh@protonmail.com>
      Cc: Andreas Hindborg <a.hindborg@samsung.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/r/20240625214117.953777-3-irogers@google.com
      39f3ce5c
    • Ian Rogers's avatar
      perf build: Add '*.a' to clean targets · 7f240209
      Ian Rogers authored
      Fix some excessively long lines by deploying '\'.
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Albert Ou <aou@eecs.berkeley.edu>
      Cc: Nick Terrell <terrelln@fb.com>
      Cc: Gary Guo <gary@garyguo.net>
      Cc: Alex Gaynor <alex.gaynor@gmail.com>
      Cc: Boqun Feng <boqun.feng@gmail.com>
      Cc: Wedson Almeida Filho <wedsonaf@gmail.com>
      Cc: Ze Gao <zegao2021@gmail.com>
      Cc: Alice Ryhl <aliceryhl@google.com>
      Cc: Andrei Vagin <avagin@google.com>
      Cc: Yicong Yang <yangyicong@hisilicon.com>
      Cc: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Miguel Ojeda <ojeda@kernel.org>
      Cc: Will Deacon <will@kernel.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Leo Yan <leo.yan@linux.dev>
      Cc: Oliver Upton <oliver.upton@linux.dev>
      Cc: John Garry <john.g.garry@oracle.com>
      Cc: Benno Lossin <benno.lossin@proton.me>
      Cc: Björn Roy Baron <bjorn3_gh@protonmail.com>
      Cc: Andreas Hindborg <a.hindborg@samsung.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/r/20240625214117.953777-2-irogers@google.com
      7f240209
  8. 25 Jun, 2024 6 commits