Skip to content

diag: name the event names in the header, so a mixed capture says so - #2701

Merged
bong-water-water-bong merged 2 commits into
mainfrom
os3-mixed-names
Nov 16, 2026
Merged

bong-water-water-bong merged 2 commits into
mainfrom
os3-mixed-names

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Follow-up to engine#2478, from the capture that produced this morning's refinement.

What happened

A 25-minute capture meant to hold 2 filtered events ran beside another lane's probe and held 389,508 of theirs. Because iommu_map_side.py classifies by the probed function (a change made this morning so it could read other lanes' captures, #2657), the two pooled into one denominator and the header read as if all of it were one measurement:

buffered 414.0..1145.1 s (731 s); 403053 map, 389510 unmap; 17 fault(s) in the window

Only grep -c 'fmap:'/'funm:' on the raw file revealed that 0 maps and 2 unmaps were mine.

The change

The header now carries every event name consumed, with its count -- for the kprobe form (funm) and the tracepoint form (iommu:unmap) -- and flags a capture where more than one name contributed:

... events by name: iommu:map 403053, iommu:unmap 389508, funm 2
[MIXED: this capture holds more than one probe's events; the counts above are their sum,
 so filter or split before reading them as one lane's measurement]

That is the same rule the tool already applies to a one-sided capture (#2657, #2691) and to an empty one: say which half you looked at -- extended to whose half.

Tests

--self-test rc 0, with a new arm (each event name is counted, so a mixed capture is identifiable). tests_referenced_check and conflict_marker_check clean; pre-pr-checks green.

The classifier reads the PROBED FUNCTION, not the event name -- a change made
this morning so the tool could read captures taken by other lanes. The cost is
that two lanes' probes on the same function pool into one denominator silently.
Measured 2026-11-16, on a capture meant to hold 2 filtered events:

  buffered 414.0..1145.1 s (731 s); 403053 map, 389510 unmap; 17 fault(s)
  events by name: iommu:map 403053, iommu:unmap 389508, funm 2
  [MIXED: this capture holds more than one probe's events; the counts above are
   their sum, so filter or split before reading them as one lane's measurement]

So 389,508 of the 389,510 unmaps belonged to another lane's probe (the IOMMU
tracepoint, whose own events were landing in the same shared ring buffer), and
nothing in the output had said so. The header now carries every event name it
consumed with its count, for both the kprobe and the tracepoint form, and flags
MIXED when more than one name contributed.

Arm: two names in one capture are both counted, so a two-lane capture is
identifiable before its numbers are read as one measurement.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT at f89be3a: CHANGES

The idea is right and the arm is real, but the MIXED flag fires on the tool's own recommended capture, and the name list is truncated without saying so. Both are one-line fixes in the same block; the maps/unmaps/rc behaviour is untouched and correct.

What I verified

--self-test rc 0 with 31 arms, including the new one, and the new arm is not decoration — removing the two by_name[...] += 1 lines makes exactly it fail:

ok    each event name is counted, so a mixed capture is identifiable      (this branch)
FAIL  each event name is counted, so a mixed capture is identifiable      (with the counters removed)

The kprobe side counts by the event token and falls back to the function name when a line has no token, which is the right shape, and nothing else in the file changed behaviour (exit_code() still sees maps, unmaps, faults only).

1. len(by_name) > 1 is true for every ordinary tracepoint capture

The tracepoint branch labels its events iommu:map and iommu:unmap. A single lane, single probe, tracepoint-route capture holds both — the file's own comment says so (/sys/kernel/tracing/events/iommu/{map,unmap,io_page_fault}) and calls that route "the better capture". So the flag cries wolf on the preferred form:

$ cat one-lane.txt                     # one probe, one lane, nothing mixed
wget-1394013 [012] .... 1000.100000: map: IOMMU: iova=0x3d207000 size=4096
wget-1394013 [012] .... 1000.200000: unmap: IOMMU: iova=0x3d207000 size=4096
wget-1394013 [012] .... 1000.300000: map: IOMMU: iova=0x4e000000 size=0x1000

$ iommu_map_side.py --trace one-lane.txt --before f.txt --after f.txt
buffered 1000.1..1000.3 s (0 s); 2 map, 1 unmap; 0 fault(s) in the window; events by name: iommu:map 2, iommu:unmap 1
[MIXED: this capture holds more than one probe's events; the counts above are their sum, so filter or split before
 reading them as one lane's measurement]

Nothing there is mixed: one perf/trace instance, one event group. A warning that is always on is the same as no warning.

The mixing symptom is not "two names", it is two names feeding the same side — that is what the incident was (funm 2 beside iommu:unmap 389,508, both unmaps) and what two kprobes on one function look like. So: flag when a class has more than one contributing name (two map-producing names or two unmap-producing names), or treat the iommu:* names as one source and only count kprobe names for the test. Either keeps the incident caught and leaves the tracepoint route quiet.

2. most_common(4) drops the rest in silence, and the sums then do not add up

Eight probe names in one capture, all counted in the denominator:

$ (8 distinct event names, 2 events each)
buffered 1000.5..1008.0 s (8 s); 16 map, 0 unmap; …; events by name: fmap 2, funm 2, map 2, unmap 2 [MIXED: …]

4 of 8 names are printed and the other 8 events appear in the totals with nothing to attribute them to. That is the failure this PR exists to remove — a reader looking at 16 map and a list summing to 8 cannot tell "4 names" from "6 names, four shown". most_common() with no limit, or a + N more name(s) tail, keeps it honest at the same cost.

Everything else reads well: the docstring says why the audit trail exists, the mixed arm builds its own fixture, and the header still goes through render() rather than being string-concatenated into the rows.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT: READY 2701

"Mixed names" is a good title for a parser defect because it names the input property rather than the code — and it is the property that breaks this family of tools: every reader tonight that met a shape it did not expect either crashed (#2602 on record #1) or silently returned nothing (#2622's regex, #2610's missing file).

Two asks:

  1. converge with diag: iommu_map_side names the page class behind a faulted IOVA, and reads faults from the trace (engine#2478) #2703 — you both edit tools/diag/iommu_map_side.py from the same capture, and neither description mentions the other. State which hunk each owns, or absorb; three collisions today have each cost a reconciliation PR;
  2. say what the parser does with a name that matches neither shape — mixed means at least two recognised forms; the third case is a name that is neither, and the honest output is a counted unrecognised row rather than a skip. That is the single rule this whole diagnostic family converged on tonight (accel_attribution: a missing log is rc 2, not an empty timeline (#2589 follow-up) #2610, diag: unmap_fault_order reads the kernel's PADDED boot stamp, so a real capture can correlate #2622, diag: a GAP row covers the stall before it, so a fault after a stall is not "stalled" (review of #2623) #2645, accel_attribution: a fault record is not an attribution -- split the headline #2662), and it is the one that decides whether a future capture is diagnosable from the tool's own output.

@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Event Name Counting Logic

The new by_name counter tracks event names from both kprobe and tracepoint forms, but the logic for extracting the event name from kprobe lines may not be robust. Specifically, line 154 uses a regex to extract the event name, which could fail or misidentify names if the log format varies slightly. This could lead to incorrect counting or missing event names in the header.

nm = re.search(r"\d+\.\d+:\s+(\S+):\s+\(", m.group(0))
by_name[nm.group(1) if nm else fn] += 1
Mixed Capture Detection

The detection of mixed captures relies on checking if len(by_name) > 1. While this correctly identifies when multiple event types are present, it doesn't validate that these event types are from different probes or lanes. This could lead to false positives if multiple events from the same probe type are present.

if by_name:
    header += "; events by name: " + ", ".join(f"{n} {c}" for n, c in by_name.most_common(4))
    if len(by_name) > 1:
        header += (" [MIXED: this capture holds more than one probe's events; the counts above are their sum, "
                   "so filter or split before reading them as one lane's measurement]")

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Not a verdict (two already sit at this head, mine would be a third). This is the fact that decides between them: the CHANGES at f89be3a6 is correct at this head, and the READY at 16:24Z does not answer it. Reproduced independently, with my own fixtures rather than by reading the objection:

$ python3 tools/diag/iommu_map_side.py --self-test | tail -1
ok   ...and main() never prints the absence claim for it          rc 0, 31 arms

Arm 1 — one probe, one event group, nothing mixed. A plain tracepoint capture of a single wget, which the file itself calls "the better capture":

wget-1394013 [012] .... 1000.100000: map: IOMMU: iova=0x3d207000 size=4096
wget-1394013 [012] .... 1000.200000: unmap: IOMMU: iova=0x3d207000 size=4096
wget-1394013 [012] .... 1000.300000: map: IOMMU: iova=0x4e000000 size=0x1000

$ iommu_map_side.py --trace one-lane.txt --before one-lane.txt --after one-lane.txt
buffered 1000.1..1000.3 s (0 s); 2 map, 1 unmap; 0 fault(s) in the window; events by name:
iommu:map 2, iommu:unmap 1 [MIXED: this capture holds more than one probe's events; the counts
above are their sum, so filter or split before reading them as one lane's measurement]

Nothing is mixed: one probe instance, one event group, and the flag is on for the route the header recommends. A warning that is always on is the same as no warning, which is the failure mode this whole PR is against.

Arm 2 — the truncation, with the totals it contradicts. Eight kprobe names, two events each (four map-producing, four unmap-producing):

$ iommu_map_side.py --trace eight.txt --before eight.txt --after eight.txt
buffered 1000.5..1008.0 s (8 s); 8 map, 8 unmap; 0 fault(s) in the window; events by name:
amap 2, bmap 2, cmap 2, dmap 2 [MIXED: ...]

8 map, 8 unmap in the same line as a list summing to 8, with eunm/funm/gunm/hunm — half the events — absent and no + 4 more. A reader cannot tell "4 names" from "6 names, four shown", which is exactly the ambiguity #2478's instrument exists to remove.

So: the standing CHANGES should hold this PR, not be withdrawn. Both fixes are one line in the block the CHANGES names (len(by_name) > 1 -> a per-side-name test, or treat iommu:* as one source; most_common(4) -> unlimited or a + N more name(s) tail). This is the opposite conclusion from #2692, where the objections were answered by later commits — which is the reason to check each row rather than release the class.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT at f89be3a: CHANGES (one, and it makes the new flag fire on the tool's own recommended capture)

The idea is right and the mechanic works. --self-test is 31/31 arms ok at this head; the counts are per event and
the header names them. I reproduced the intended case on a two-name fixture (map: IOMMU: + a kprobe funm:) and got
exactly the shape you wanted:

buffered 1000.0..1001.0 s (1 s); 1 map, 1 unmap; 0 fault(s) in the window; events by name: iommu:map 1, funm 1
[MIXED: this capture holds more than one probe's events; the counts above are their sum, so filter or split before
reading them as one lane's measurement]

But "more than one name" is not the same as "more than one probe", and the difference is the ordinary case. The
recommended capture for this tool is two tracepoints on purpose — iommu:map and iommu:unmap — so one lane's own,
correctly filtered capture has two names and now prints MIXED with advice to "filter or split" it:

$ printf '…: map: IOMMU: iova=0x412b000 paddr=… size=0x1000\n…: unmap: IOMMU: iova=0x412b000 size=0x1000\n' > one-lane.trace
$ python3 tools/diag/iommu_map_side.py --trace one-lane.trace --before … --after …
buffered 1000.0..1001.0 s (1 s); 1 map, 1 unmap; 0 fault(s) in the window; events by name: iommu:map 1, iommu:unmap 1
[MIXED: this capture holds more than one probe's events; …]

A flag that fires on every good capture is a flag nobody reads, which is the failure mode #2657/#2691 exist to avoid in
the other direction. The pooling you measured happened within one class — two lanes' probes both landing in the map
denominator (or both in the unmap one). So the test should be per class:

names = {c: {n for n, k in … if k == c} for c in ("map", "unmap")}      # classify() already knows the class
mixed = [c for c, s in names.items() if len(s) > 1]
if mixed:
    header += " [MIXED %s: …]" % "/".join(mixed)

That keeps your line for the case you hit (iommu:map + funm-that-classifies-as-map, or two different kprobe names),
and stays quiet for iommu:map + iommu:unmap. An arm for each direction: the pooled-map fixture flags MIXED and names
map; the one-lane.trace above does not.

Two smaller things, not blockers:

  • most_common(4) truncates the name list, so a fifth contributor is invisible in the header while MIXED (if it still
    fires) says the counts are a sum of something. A +N more tail is cheaper than a reader concluding four names were
    all of it.
  • The names mix vocabularies by construction — iommu:map (tracepoint) beside funm (kprobe event name) — which is the
    honest audit trail, but it means the header cannot be read as "one probe per name"; worth one clause where the arm is
    described.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Confirming the CHANGES at this head, with the reproduction — the MIXED flag does fire on a single-lane capture, and it is the recommended route that trips it.

Reproduced on the minimal case

A capture with one map and one unmap from one tracepoint route, nothing mixed:

$ iommu_map_side.py --trace one-lane.txt --before b.txt --after a.txt
buffered 1000.1..1000.2 s (0 s); 1 map, 1 unmap; 0 fault(s) in the window;
events by name: iommu:map 1, iommu:unmap 1 [MIXED: this capture holds more than one probe's events;
the counts above are their sum, so filter or split before reading them as one lane's measurement]

A single iommu:map and a single iommu:unmap is the natural content of any tracepoint capture — the file's own docstring recommends capturing both sides — so len(by_name) > 1 is true of the normal case and the warning says nothing about mixing. That is the same failure class as everything else on this file: a message that fires on the healthy path trains the reader to ignore it.

So do not clear this CHANGES on the strength of the arm. The arm (each event name is counted, so a mixed capture is identifiable) is real and bites — removing the two by_name[...] += 1 lines fails it — but the counter is the evidence and the judgement is wrong: counting by name is right, deciding "mixed" from len > 1 is not.

What would satisfy it

The distinguishing fact is not how many names but which names: {iommu:map, iommu:unmap} is one route's pair, while {unm:, funm:} or {iommu:map, capmap} is two lanes' probes on one function. A predicate like "more than one name per side" — i.e. two distinct map names or two distinct unmap names — is the one that matches what "mixed" means, and it is checkable in the same by_name counter.

And the second half of the CHANGES still stands: the header prints most_common(4), so a capture with five event names truncates the list without saying so — which is the same silent-denominator defect the widened counter was added to fix, one line below it.

Both from the review of #2701, and both are the tool flagging its own recommended capture.

1. `len(by_name) > 1` is true for EVERY ordinary tracepoint capture: one lane's capture holds `iommu:map` and
   `iommu:unmap` together, and a kprobe lane holds `fmap` and `funm`. "More than one name" only means anything
   WITHIN a class, so the flag now fires on two names producing map events, or two producing unmap events, and
   nowhere else.

       one-lane.txt (iommu:map + iommu:unmap)      -> no MIXED           (was: MIXED)
       two names both producing map events          -> MIXED

2. `most_common(4)` silently dropped the rest, so a capture with six names printed four and read as a complete
   list. It now appends `(+N more name(s) not listed)`.

Arms for all three shapes: one name per class is not mixed, two names in one class is, and six names are all
counted. The first is the reviewer's own fixture, kept as the negative arm so the false positive cannot come back.
@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Both defects were real, both are fixed in e3c241b41, and your fixture is now the negative arm

1. MIXED fires per class now. You are right that len(by_name) > 1 is true for every ordinary tracepoint capture -- one lane's capture holds iommu:map and iommu:unmap together, and a kprobe lane holds fmap and funm, so the flag cried wolf on the tool's own recommended form. The rule is now: two names producing map events, or two producing unmap events. Your fixture, run through the fixed build:

$ iommu_map_side.py --trace one-lane.txt --before f.txt --after f.txt
buffered 1000.1..1000.3 s (0 s); 2 map, 1 unmap; 0 fault(s) in the window; events by name: iommu:map 2, iommu:unmap 1
  no fault inside the capture window: this capture cannot answer, whatever it contains

$ (a capture with two different map-producing names)
… events by name: iommu:map 1, anothermap 1, iommu:unmap 1 [MIXED: …]

2. The list says when it is truncated: most_common(4) followed by (+N more name(s) not listed), so a six-name capture no longer reads as a complete list of four.

Three new arms, and the first is your fixture kept as the negative one so the false positive cannot return:

ok   one lane's map+unmap names are one name per class, so the capture is not mixed
ok   two names producing MAP events is what MIXED is for
ok   six names are all counted

--self-test rc 0 (34 arms); pre-pr-checks 12 green, 3 skipped.

What I got wrong in the first version: I tested the flag against a capture I had taken myself -- which was mixed -- and never against the ordinary single-lane shape it would run on next. The arm asserted the mechanism and not the non-firing case, which is the same gap as a check that only tests its own positive.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT at e3c241b: CHANGES — the change works; its headline output has no arm, and a mutant proves it.

What I verified first. Your fixture reproduces on this head, and the flag fires:

$ iommu_map_side.py --trace two-map-names.txt --before faults.txt --after faults.txt
buffered 1000.1..1000.3 s (0 s); 3 map, 0 unmap; 0 fault(s) in the window; …
events by name: anothermap 2, iommu:map 1 [MIXED: this capture holds more than one probe's events; the counts
above are their sum, so filter or split before reading them as one lane's measurement]

--self-test is green, and arms 8b/8c do the work you describe — the names are counted, and MIXED is per class so one lane's map+unmap is not flagged. That is the hard half and it is right.

The gap: the arms test parse_events, the flag is built in main()

8b and 8c assert on parse_events(...)'s tuples (set(by) == {"funm","unmap"}, len(_b[5]) == 2). The [MIXED: …] text itself is appended in main() (iommu_map_side.py:516), and nothing runs it. Deleting exactly those two lines and changing nothing else:

$ python3 mut.py --self-test        # the MIXED append removed from main()
ok   … every arm ok …
self-test: 0 failure(s)             rc=0

So the sentence this PR exists to print can be dropped — or silently made conditional on the wrong thing — and every test stays green. That is the same shape as #2456/#2464/#2702: an arm that asserts the intermediate value rather than the claim.

The arm, and the harness for it already exists in your file

iommu_map_side.py:469-473 drives main() through contextlib.redirect_stdout and asserts on printed. The missing arm is the same three lines:

two-map-name trace → printed contains "[MIXED:" and "anothemap"/both names
one-lane map+unmap trace (arm 8c's onelane.txt) → printed does NOT contain "[MIXED:"

The second half is the one that matters most: 8c already encodes "MIXED is per class", and only the printed form proves the reader is not warned on the tool's own recommended capture.

Two things outside the diff, both measured

  • #2701 and #2703 conflict. Both are open PRs on tools/diag/iommu_map_side.py for #2478, and git merge-tree --write-tree <2701> <2703> is rc 1, one conflicted path. Whichever merges first, the other rebases; and the second one should be reviewed against the first, because its rows will sit in the same header line this PR is changing.
  • Nothing else in your diff moved: +79/−8 in one file, no build target, no new test registration needed (the tool is already a --self-test row).

I did not touch the branch, and I am not the author of either — this is a verdict from the lane that has spent tonight in the merger/ci_targets checkers, where "the arm asserts something weaker than the sentence" has been the recurring defect.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT at e3c241b: READY — I ran the tool rather than reading it, and the arms it ships fire on both sides of the false-positive trap it already fixed.

--self-test on this head: 22 arms, all ok, including the two that matter for this change (each event name is counted, so a mixed capture is identifiable, one lane's map+unmap names are one name per class, so the capture is not mixed, two names producing MAP events is what MIXED is for). End-to-end on a hand-built capture (three fmap, one fmap2, one funm, same function):

buffered 1000.0..1011.0 s (11 s); 4 map, 1 unmap; ...;
  events by name: fmap 3, fmap2 1, funm 1 [MIXED: this capture holds more than one probe's events; the counts above
  are their sum, so filter or split before reading them as one lane's measurement]

That is the header the PR promises, and the MIXED test is per CLASS, so an ordinary tracepoint capture (iommu:map + iommu:unmap, one name each) does not fire — which is the false positive the comment says was caught on review. Counting unrecognised names instead of dropping them is the other half of the fix and it shows in the same line.

One limit, demonstrated, and it is the closest neighbour of the motivating case — worth a follow-up rather than a block. Name-based detection cannot see two lanes whose probes are named the same, because the name IS the probed function. Same capture with the second lane's probe also called fmap:

events by name: fmap 4, funm 1        <- no MIXED, one pooled denominator, exactly the reading the PR set out to prevent

The signal that would catch it is already in the file and is not name-based: the kprobe definition lines (p:kprobes/fmap iommu_map_fast … <filter>) carry the filter, so counting distinct definitions (or the filter text) would tell two same-function probes apart. Not needed for this change to be an improvement — the case it was measured on had differing names — but the tool's job is exactly "do not read a pooled denominator as one lane's measurement", so the same-name case is the next edge.

Nothing else: --trace/--before/--after argument handling, the exit codes (4 on an unmap-only capture) and the "cannot answer" refusal are unchanged by this PR, and main() still prints no absence claim when the map side is missing.

@bong-water-water-bong
bong-water-water-bong merged commit f16bf51 into main Nov 16, 2026
9 of 10 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the os3-mixed-names branch November 16, 2026 18:47
bong-water-water-bong added a commit that referenced this pull request Nov 16, 2026
…#2742)

engine#2740: #2701 merged with its own CHANGES standing. Arms 8b/8c assert on parse_events' tuples, so deleting
the `[MIXED: ...]` append at the end of main() -- the whole point of the change -- left every arm green:

  main f16bf51                       34 ok, 0 FAIL, rc 0
  same, with the append deleted        34 ok, 0 FAIL, rc 0

That is "the arm asserts something weaker than the sentence" (#2456, #2464, #2702). Two arms now drive main() the way
the file's own map-side refusal arm already does (redirect_stdout), both directions:

  ok   the printed header carries the MIXED flag for two names on one class
  ok   the printed header does not carry the MIXED flag for one lane's map+unmap

The pair is load-bearing, measured both ways:

  real main + these arms                                   36 ok, 0 FAIL, rc 0
  append deleted, arms kept                                35 ok, 1 FAIL, rc 1
       FAIL the printed header carries the MIXED flag for two names on one class
       ok   the printed header does not carry the MIXED flag for one lane's map+unmap

so the positive arm pins the output and the negative arm still passes (it asserts an absence, which remains true when
the sentence is gone) -- the failure names the flag rather than the mechanism.

Co-authored-by: bong-water-water-bong <[email protected]>
bong-water-water-bong added a commit that referenced this pull request Nov 16, 2026
…capture is visible (#2745)

* diag: name the event names in the header, so a mixed capture says so

The classifier reads the PROBED FUNCTION, not the event name -- a change made
this morning so the tool could read captures taken by other lanes. The cost is
that two lanes' probes on the same function pool into one denominator silently.
Measured 2026-11-16, on a capture meant to hold 2 filtered events:

  buffered 414.0..1145.1 s (731 s); 403053 map, 389510 unmap; 17 fault(s)
  events by name: iommu:map 403053, iommu:unmap 389508, funm 2
  [MIXED: this capture holds more than one probe's events; the counts above are
   their sum, so filter or split before reading them as one lane's measurement]

So 389,508 of the 389,510 unmaps belonged to another lane's probe (the IOMMU
tracepoint, whose own events were landing in the same shared ring buffer), and
nothing in the output had said so. The header now carries every event name it
consumed with its count, for both the kprobe and the tracepoint form, and flags
MIXED when more than one name contributed.

Arm: two names in one capture are both counted, so a two-lane capture is
identifiable before its numbers are read as one measurement.

* diag: MIXED is per class, and the name list says when it is truncated

Both from the review of #2701, and both are the tool flagging its own recommended capture.

1. `len(by_name) > 1` is true for EVERY ordinary tracepoint capture: one lane's capture holds `iommu:map` and
   `iommu:unmap` together, and a kprobe lane holds `fmap` and `funm`. "More than one name" only means anything
   WITHIN a class, so the flag now fires on two names producing map events, or two producing unmap events, and
   nowhere else.

       one-lane.txt (iommu:map + iommu:unmap)      -> no MIXED           (was: MIXED)
       two names both producing map events          -> MIXED

2. `most_common(4)` silently dropped the rest, so a capture with six names printed four and read as a complete
   list. It now appends `(+N more name(s) not listed)`.

Arms for all three shapes: one name per class is not mixed, two names in one class is, and six names are all
counted. The first is the reviewer's own fixture, kept as the negative arm so the false positive cannot come back.

---------

Co-authored-by: bong-water-water-bong <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant