mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnaldo Melo <arnaldo.melo@gmail.com>
To: Namhyung Kim <namhyung@kernel.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Athira Rajeev <atrajeev@linux.ibm.com>,
	Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	James Clark <james.clark@linaro.org>,
	Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Clark Williams <williams@redhat.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: [PATCH v13 00/19] perf coverage: A harness for perf, and the fixes it found
Date: Sun, 29 Nov 2026 21:45:00 -0300	[thread overview]
Message-ID: <E26EB089-ECC5-404F-99C7-47A6A60A781C@gmail.com> (raw)
In-Reply-To: <awyyY4BlXb8lOrWX@google.com>



On November 29, 2026 8:16:51 PM GMT-03:00, Namhyung Kim <namhyung@kernel.org> wrote:
>On Sun, Nov 29, 2026 at 02:20:11PM -0300, Arnaldo Carvalho de Melo wrote:
>> On Sun, Nov 29, 2026 at 04:32:33PM +0530, Athira Rajeev wrote:
>> > > On 26 Nov 2026, at 12:52 AM, Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
>> > > On aarch64 (Raspberry Pi 4, Cortex-A72, clang 19), the full suite as
>> > > root, run sequentially, measured 101119 of 232961 lines (43.41%), 75800
>> > > of 171070 in tools/perf/ (44.31%), 142 passed, 133 subtests, 47 skipped,
>> > > two timed out and one failed (130, the stat test; 17 now selects an
>> > > absent CPU instead of an online one).  The parallel test mode starts
>> > > every test at once and times out on the four cores, hence --sequential
>> > > and --timeout (18).
>> 
>> > Hi Arnaldo,
>> 
>> Hi Athira,
>>  
>> > Thanks for adding coverage support to perf. I tried this on powerpc and it
>> > helps to see where the coverage gaps are.
>> 
>> Excellent!
>> 
>> > Steps and adding just snippet:
>>  
>> > $ make -C tools/perf coverage-prep
>> > $ make -C tools/perf coverage
>> > $ make -C tools/perf coverage-table COVERAGE_ARGS="--all"
>>  
>> > Output of 'make -C tools/perf coverage':
>>  
>> > warning: some tests failed, coverage is still collected
>> > ==> Merging 1930 profile files (3.7G)
>> > ==> Generating report
>> > warning: 2 functions have mismatched data
>>  
>> > Total: 93762 of 212725 lines covered (44.08%)
>> > perf: 72088 of 152293 lines covered (47.34%)
>>  
>> > Baseline saved: /root/perf-tools-next/tools/perf/cov/baseline.txt
>>  
>> > tools/perf (no tests/ or bench/), 100+ executable lines:
>> > the 20 biggest uncovered gaps, start here when adding coverage tests.
>> > --all for every file: make -C tools/perf coverage-table COVERAGE_ARGS="—all”
>> > 
>> > ┌──────────────────────────────────────────┬───────────────┬───────────────────────────┬───────────────┬───────────────────────────┐
>> > │ File                                     │         Lines │         Coverage          │         Funcs │         Coverage          │
>> > ├──────────────────────────────────────────┼───────────────┼───────────────────────────┼───────────────┼───────────────────────────┤
>> > │ util/intel-pt.c                          │        0/3244 │ ░░░░░░░░░░░░░░░░░░   0.0% │         0/143 │ ░░░░░░░░░░░░░░░░░░   0.0% │
>> > │ util/intel-pt-decoder/intel-pt-decoder.c │        0/3208 │ ░░░░░░░░░░░░░░░░░░   0.0% │         0/119 │ ░░░░░░░░░░░░░░░░░░   0.0% │
>> > │ builtin-script.c                         │      988/3221 │ █████░░░░░░░░░░░░░  30.7% │        40/124 │ █████░░░░░░░░░░░░░  32.3% │
>> > │ builtin-sched.c                          │     1539/3737 │ ███████░░░░░░░░░░░  41.2% │        61/141 │ ███████░░░░░░░░░░░  43.3% │
>> > │ util/auxtrace.c                          │       90/2035 │ ░░░░░░░░░░░░░░░░░░   4.4% │        14/128 │ █░░░░░░░░░░░░░░░░░  10.9% │
>> > │ util/annotate.c                          │      592/2348 │ ████░░░░░░░░░░░░░░  25.2% │        49/125 │ ███████░░░░░░░░░░░  39.2% │
>> > │ builtin-trace.c                          │     1942/3659 │ █████████░░░░░░░░░  53.1% │       135/198 │ ████████████░░░░░░  68.2% │
>> > │ util/sort.c                              │      749/2427 │ █████░░░░░░░░░░░░░  30.9% │        70/246 │ █████░░░░░░░░░░░░░  28.5% │
>> > │ util/session.c                           │     1038/2690 │ ██████░░░░░░░░░░░░  38.6% │        60/125 │ ████████░░░░░░░░░░  48.0% │
>> > │ util/header.c                            │     2467/3941 │ ███████████░░░░░░░  62.6% │       150/180 │ ██████████████░░░░  83.3% │
>>  
>> > For coverage “all”
>>  
>> > make -C tools/perf coverage-table COVERAGE_ARGS="--all"
>> > make: Entering directory '/root/perf-tools-next/tools/perf'
>> > every tools/perf file, tests and benches included, most covered first.
>> > 
>> > ┌───────────────────────────────────────────────┬───────────────┬───────────────────────────┬───────────────┬───────────────────────────┐
>> > │ File                                          │         Lines │         Coverage          │         Funcs │         Coverage          │
>> > ├───────────────────────────────────────────────┼───────────────┼───────────────────────────┼───────────────┼───────────────────────────┤
>> > │ builtin-version.c                             │         12/12 │ ██████████████████ 100.0% │           2/2 │ ██████████████████ 100.0% │
>> > │ tests/bitmap.c                                │         33/33 │ ██████████████████ 100.0% │           3/3 │ ██████████████████ 100.0% │
>> > │ tests/event_update.c                          │         63/63 │ ██████████████████ 100.0% │           5/5 │ ██████████████████ 100.0% │
>> > │ tests/kmod-path.c                             │       112/112 │ ██████████████████ 100.0% │           3/3 │ ██████████████████ 100.0% │
>> > │ tests/mem.c                                   │         34/34 │ ██████████████████ 100.0% │           2/2 │ ██████████████████ 100.0% │
>> > │ tests/pe-file-parsing.c                       │           4/4 │ ██████████████████ 100.0% │           1/1 │ ██████████████████ 100.0% │
>> > │ tests/pfm.c                                   │           6/6 │ ██████████████████ 100.0% │           2/2 │ ██████████████████ 100.0% │
>> > │ tests/sdt.c                                   │           4/4 │ ██████████████████ 100.0% │           1/1 │ ██████████████████ 100.0% │
>> > │ tests/subcmd-help.c                           │         79/79 │ ██████████████████ 100.0% │           4/4 │ ██████████████████ 100.0% │
>> > │ tests/thread-map.c                            │         86/86 │ ██████████████████ 100.0% │           4/4 │ ██████████████████ 100.0% │
>> > │ tests/thread-maps-share.c                     │         47/47 │ ██████████████████ 100.0% │           1/1 │ ██████████████████ 100.0% │
>> > │ tests/util.c                                  │         49/49 │ ██████████████████ 100.0% │           4/4 │ ██████████████████ 100.0% │
>> > │ tests/workloads/datasym.c                     │         19/19 │ ██████████████████ 100.0% │           2/2 │ ██████████████████ 100.0% │
>> > │ tests/workloads/inlineloop.c                  │         26/26 │ ██████████████████ 100.0% │           5/5 │ ██████████████████ 100.0% │
>> > │ trace/beauty/fs_at_flags.c                    │         22/22 │ ██████████████████ 100.0% │           4/4 │ ██████████████████ 100.0% │
>> > 
>> > 
>> > Notes:
>> > - The default table is ordered by uncovered lines, so on powerpc the
>> > x86/arm-only files (intel-pt*, arm-spe, kvm) rank first at 0%. They
>> > can't be exercised on this arch, so the useful targets here are
>> 
>> I think we can have in the codebase simple perf.data files with Intel
>> pt, coresight records, sometimes we find problems that are relevant to
>> the most plausible use case for those encodings when doing cross
>> analysis.
>> 
>> > builtin-script.c, builtin-sched.c, util/annotate.c and util/sort.c.
>> > - --all sorts the other way (most covered first) and includes tests/
>> > and bench/.
>> > 
>> > Tested-by: Athira Rajeev <atrajeev@linux.ibm.com>
>
>Thanks for testing this.
>
>> 
>> there's another series posted that add more perf test tests, new ones
>> and additions to existing ones eggs will most likely bump the code
>> that's tested/covered in ppc64.
>
>Arnaldo, how do you want to process the series?  I'm not sure if they
>are independent or not.

The two series are independent, but I think we should merge the tested one first, this series that Athira tested and provided his tested-by tag.

I hope the other one gets tested next, but IIRC there's some Sashiko comments I need to address that I'm waiting a while to respond to.

I have one more than depends on this coverage infrastructure that I'll submit after this one is merged.

Thanks,

- Arnaldo

      reply	other threads:[~2026-11-30  0:45 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 19:22 Arnaldo Carvalho de Melo
2026-11-25 19:22 ` [PATCH v13 01/19] perf build: Link the GTK UI with EXTRA_CFLAGS Arnaldo Carvalho de Melo
2026-11-25 19:22 ` [PATCH v13 02/19] perf annotate: Handle absolute addressing in data type profiling Arnaldo Carvalho de Melo
2026-11-25 19:22 ` [PATCH v13 03/19] perf annotate: Print the stats where the counters are final Arnaldo Carvalho de Melo
2026-11-25 19:22 ` [PATCH v13 04/19] perf build: Record the features checked outside FEATURE_TESTS Arnaldo Carvalho de Melo
2026-11-25 19:22 ` [PATCH v13 05/19] perf annotate-x86: Record immediates in a 64-bit field Arnaldo Carvalho de Melo
2026-11-25 19:22 ` [PATCH v13 06/19] perf annotate-x86: Parse movabs like a mov Arnaldo Carvalho de Melo
2026-11-25 19:23 ` [PATCH v13 07/19] perf annotate-data: Count flexible array accesses for the whole struct Arnaldo Carvalho de Melo
2026-11-25 19:23 ` [PATCH v13 08/19] perf test: Exercise the x86 operand parser Arnaldo Carvalho de Melo
2026-11-25 19:23 ` [PATCH v13 09/19] perf test: Exercise DW_OP_addrx global variables Arnaldo Carvalho de Melo
2026-11-25 19:23 ` [PATCH v13 10/19] perf test: Exercise the flexible array member path Arnaldo Carvalho de Melo
2026-11-25 19:23 ` [PATCH v13 11/19] perf test: Exercise data type resolution from a register Arnaldo Carvalho de Melo
2026-11-25 19:23 ` [PATCH v13 12/19] perf test: Exercise the annotate stats output Arnaldo Carvalho de Melo
2026-11-25 19:23 ` [PATCH v13 13/19] perf test: Fix the Intel PT virtual LBR check Arnaldo Carvalho de Melo
2026-11-25 19:23 ` [PATCH v13 14/19] perf test: Drop samples without an IP in the dlfilter test Arnaldo Carvalho de Melo
2026-11-25 19:23 ` [PATCH v13 15/19] perf test: Skip the LBR inline unwinding check when unsupported Arnaldo Carvalho de Melo
2026-11-25 19:23 ` [PATCH v13 16/19] perf test: Skip the trace summary BPF tests without kernel BTF Arnaldo Carvalho de Melo
2026-11-25 19:23 ` [PATCH v13 17/19] perf test: Avoid online CPUs in the offline stat test Arnaldo Carvalho de Melo
2026-11-25 19:23 ` [PATCH v13 18/19] perf scripts: Add a coverage harness for perf Arnaldo Carvalho de Melo
2026-11-25 19:23 ` [PATCH v13 19/19] perf scripts: Add a coverage table Arnaldo Carvalho de Melo
2026-11-29 11:02 ` [PATCH v13 00/19] perf coverage: A harness for perf, and the fixes it found Athira Rajeev
2026-11-29 17:20   ` Arnaldo Carvalho de Melo
2026-11-29 23:16     ` Namhyung Kim
2026-11-30  0:45       ` Arnaldo Melo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E26EB089-ECC5-404F-99C7-47A6A60A781C@gmail.com \
    --to=arnaldo.melo@gmail.com \
    --cc=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=atrajeev@linux.ibm.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=williams@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®