Skip to content

Docs/m1 changelog - #4

Merged
nareshns2004 merged 6 commits into
mainfrom
docs/m1-changelog
Nov 17, 2026
Merged

nareshns2004 merged 6 commits into
mainfrom
docs/m1-changelog

Conversation

@nareshns2004

Copy link
Copy Markdown
Owner

No description provided.

nareshns2004 and others added 6 commits November 17, 2026 20:11
At perf_event_paranoid=2 an unprivileged user may only count with
exclude_kernel=1. make_attr never set it, so every counter failed with
EACCES even though the README said level 2 was enough.

Counters now retries the whole event set with exclude_kernel=1 on
EACCES/EPERM (what perf stat does with an implicit :u), exposes
.scope, and profile records counted_scope in the recording. The
report gets cache.counted_scope plus an INFO finding when kernel mode
was excluded. PerfUnavailable now carries errno instead of callers
string-matching 'paranoid'.

Fixes the paranoid advice in the README, linux-performance doc, the
config finding and the regenerated laptop sample report.

Tests: mocked perf_event_open that refuses kernel-mode counting,
no-permission-at-all, unsupported-event skip, report surfacing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
process_node_residency came from /proc/<pid>/stat field 39, which is the
thread-group leader's last CPU. A server whose main thread sleeps on one
node while its workers run on another got the wrong residency, so the
flagship numa.process_misplaced finding could blame the wrong socket.

The recorder now also reads /proc/<pid>/task/<tid>/stat each sample,
capped by --max-threads (default 256, lowest tids, recorded in meta).
Analysis credits each thread's delta(utime+stime) between consecutive
samples to the node of the CPU it last ran on. Recordings without task
files fall back to the leader and say so in data_quality, as does a
recording that hit the thread cap.

The synthetic generator gives workers home nodes and an optional idle
leader (main_thread_node), so residency matches the spec exactly. The
ground-truth test now expects the exact mismatch 0.80; the old 0.85
only passed because of leader-sampling noise. Samples regenerated.

Tests: idle main thread on node 1 + workers on node 0 is not flagged
(and is flagged by the legacy path), thread-cap reporting, numeric tid
ordering, live task-file capture for the test process.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ns (A3, A4)

A3: an exact permutation test with n runs per side can't go below
2/C(2n, n): 0.33 at n=2, 0.10 at n=3, 0.029 at n=4, 0.008 at n=5. The
hint recommended 3 runs per side, where nothing can ever be significant,
and such results were labelled 'no significant change'. Now:
- min_achievable_p() and the report header print the floor;
- verdict is 'inconclusive (too few runs)' when the floor is >= alpha;
- the hint says >= 5 runs per side (4 only works with perfect separation).

A4: 23 key metrics at alpha=0.05 expect ~1 false positive per compare.
- --primary METRIC: pre-declared metrics tested at alpha;
- all other metrics judged on Benjamini-Hochberg q-values (new column);
- metrics constant across every run are dropped from the family (a
  permutation-invariant filter, so it doesn't bias the test);
- --no-fdr and --alpha flags.

Docs: examples and ADR-10 updated with the reasoning (BH over
Bonferroni because the metrics are correlated).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The recorder stamped samples with time.time() and Window divided
counter deltas by b.ts - a.ts, so an NTP step or 'date -s' during a
recording corrupted every rate (or made dt negative).

Samples now carry both ts (wall, for display and log correlation) and
mono (CLOCK_MONOTONIC), and Window, timeseries and duration use
Sample.t, which prefers mono. Older recordings without mono fall back
to ts. Synthetic recordings carry mono too; samples regenerated.

Tests: a wall clock stepped back 3600 s mid-recording leaves dt and
rates intact and survives a save/load round trip; old recordings load.
ADR-11 records the decision (and why not CLOCK_BOOTTIME).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, A7)

README and CHANGELOG listed docs/interview-guide.md, which never
existed. The perf_event module docstring described a CounterGroup class
that was never written; it now explains why grouping isn't used
(inherit=1 is incompatible with PERF_FORMAT_GROUP reads) and how
multiplexed ratios are flagged instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nareshns2004 nareshns2004 self-assigned this Nov 17, 2026
@nareshns2004 nareshns2004 added the documentation Improvements or additions to documentation label Nov 17, 2026
@nareshns2004
nareshns2004 merged commit 20dd3d0 into main Nov 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant