Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
f400ef1
Add Phase 2 research plan for Darwin PMDA Apple Silicon metrics
tallpsmith Jan 23, 2026
7f894d7
Link research plan to GitHub issue #2465
tallpsmith Jan 23, 2026
42f2708
darwin: add system limits metrics (kernel.limits.*)
tallpsmith Jan 28, 2026
fde9fed
darwin: add memory compressor timing and health metrics
tallpsmith Jan 29, 2026
91c1cb3
darwin_proc: expose logical writes and memory footprint metrics
tallpsmith Jan 29, 2026
197f38a
darwin: add GPU metrics Phase 1 design document
tallpsmith Jan 29, 2026
0283412
darwin: add basic GPU monitoring metrics
tallpsmith Jan 30, 2026
11d49b8
darwin: wire GPU metrics into PMDA infrastructure
tallpsmith Jan 30, 2026
13aa280
darwin: update Phase 2 research with implementation progress
tallpsmith Jan 30, 2026
72b195c
darwin: add pmrep view configurations to Phase 2 research
tallpsmith Jan 30, 2026
2e32e1b
darwin: fix GPU metrics test namespace
tallpsmith Jan 30, 2026
845e2d7
darwin: fix hinv.ngpu metric cluster assignment
tallpsmith Jan 30, 2026
1fdd515
Consolidate macOS dev docs into CLAUDE.md hierarchy
tallpsmith Jan 30, 2026
9e067e3
This TESTING_GUIDE.md was only relevant during a previous claude plan.
tallpsmith Jan 30, 2026
55a18a6
This TESTING_GUIDE.md was only relevant during a previous claude plan.
tallpsmith Jan 30, 2026
8e5dd57
This TESTING_GUIDE.md was only relevant during a previous claude plan.
tallpsmith Jan 30, 2026
9516879
Enforce macOS development constraints in CLAUDE.md files
tallpsmith Jan 30, 2026
7019db1
Fix GPU metrics PMID mismatch and add VM-aware debug logging
tallpsmith Jan 30, 2026
6963c93
Accept empty GPU metric values in VM test environment
tallpsmith Jan 30, 2026
3b965af
Ensure we check only the first result of the GPU memory (for testing …
tallpsmith Jan 30, 2026
abfab40
Add IPC & Socket Pool metrics to complete Wave 1
tallpsmith Jan 30, 2026
20c9d64
Fix PMNS disconnected subtree by adding ipc to root namespace
tallpsmith Jan 30, 2026
53fa153
Update research doc: Wave 1 complete with IPC metrics
tallpsmith Jan 30, 2026
57b85b5
Standardize CLAUDE.md naming and add metric implementation guide
tallpsmith Jan 30, 2026
5e6b00b
Add pmrep views for Wave 1 metrics (GPU, IPC, sockets)
tallpsmith Jan 31, 2026
1f9ddba
Add CLAUDE.local.md to the .gitignore
tallpsmith Jan 31, 2026
fcd0201
Fix ConfigParser interpolation errors in pmrep views
tallpsmith Jan 31, 2026
9b17bd4
Document pmrep config development gotchas and patterns
tallpsmith Jan 31, 2026
f0ce125
Add battery/power monitoring via IOPowerSources API
tallpsmith Jan 31, 2026
a266e4c
Add missing integration tests for Wave 1-2 metrics
tallpsmith Jan 31, 2026
464c26e
Remove dbpmda test files - redundant with bash integration tests
tallpsmith Jan 31, 2026
d89a7f0
Add integration tests for power and IPC metrics
tallpsmith Jan 31, 2026
e318802
Update research doc with Wave 1-2 completion status
tallpsmith Jan 31, 2026
d26df14
Strengthen the requirement to use the pcp-code-reviewer agent rather …
tallpsmith Feb 1, 2026
68d095a
Complete Wave 2 metrics: IPv6 and process QoS CPU time
tallpsmith Feb 1, 2026
1116f0d
Update research doc with Wave 2 completion status
tallpsmith Feb 1, 2026
afdf044
Add Wave 3a metrics: Extended disk I/O and APFS statistics
tallpsmith Feb 1, 2026
8f2c3a4
Fix APFS bytes_written PMID and update research doc
tallpsmith Feb 1, 2026
d81ee69
Add high-priority PMID consistency validator task
tallpsmith Feb 1, 2026
a183326
Add PMID consistency validator
tallpsmith Feb 6, 2026
9aeab03
Add PMID validator to CI workflows
tallpsmith Feb 6, 2026
55c1740
Add proc.net metrics for TCP/UDP socket counts (Wave 3c)
tallpsmith Feb 6, 2026
dd6fdcb
Update research doc: Wave 3c complete (proc.net) and PMID validator
tallpsmith Feb 6, 2026
a89dace
Add SMC thermal monitoring (Wave 3b): visibility into throttling beha…
tallpsmith Feb 6, 2026
b15b4a3
Fix thermal FAN_INDOM initialization: add missing indomtab entry
tallpsmith Feb 6, 2026
c643c9f
Document instance domain registration requirements
tallpsmith Feb 6, 2026
f9f7190
Merge remote-tracking branch 'origin/main' into darwin-pmda-phase2-ap…
tallpsmith Feb 6, 2026
eef1757
Merge branch 'main' into darwin-pmda-phase2-apple-silicon
tallpsmith Feb 6, 2026
ba5c967
Merging CLAUDE.md changes from main
tallpsmith Feb 6, 2026
24489d9
Ensuring the CLAUDE.md file name has the correct case (merge conflict…
tallpsmith Feb 6, 2026
2e96034
Update research doc: Mark Wave 3b (Thermal) complete
tallpsmith Feb 6, 2026
f120ba6
Add macstat-pwr and macstat-thermal pmrep views
tallpsmith Feb 6, 2026
55fe459
Fix cluster number comments in darwin.h
tallpsmith Feb 6, 2026
ec0249c
Fix PMID cluster mismatch and validator subshell bug
tallpsmith Feb 6, 2026
4049861
Remove attempt to convert units that PCP doesn't really understand?
tallpsmith Feb 7, 2026
266fec3
Remove mAh unit specification from battery capacity metrics
tallpsmith Feb 7, 2026
5339427
Document PCP unit restrictions in pmrep CLAUDE.md
tallpsmith Feb 7, 2026
c700430
Address natoscott's PR review feedback
tallpsmith Feb 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ task:
[ "$PCP_SKIP_BUILD" == "true" ] && echo "SKIPPING BUILD" || ./Makepkgs --verbose
start_valkey_script: |
brew services start valkey
validate_pmid_consistency_script: |
echo "Validating PMID consistency across pmns, metrics.c, and darwin.h..."
./build/mac/test/integration/test-pmid-consistency.sh
pcp_install_script: |
DMG_PATH=$(find pcp-**/build/mac -name "pcp-*.dmg" | head -1) # Find the generated DMG
echo "Found DMG: $DMG_PATH"
Expand Down
11 changes: 9 additions & 2 deletions .claude/agents/macos-darwin-pmda-qa.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ You are a macOS Darwin PMDA QA Automation Agent. Your sole responsibility is to
1. **Verify Prerequisites**:
- Confirm the host OS is macOS
- Confirm changes were made to either @src/pmdas/darwin or @src/pmdas/darwin_proc
- If either condition fails, refuse to execute and explain why
- **CRITICAL**: Verify all relevant changes are committed to git
- Run `git status` to check for uncommitted changes in:
- `src/pmdas/darwin` or `src/pmdas/darwin_proc` (source code)
- `build/mac/` (test scripts, installer files)
- If uncommitted changes exist in any of these directories, STOP and instruct the user to commit first
- Explain: "The Tart VM clones the git repository - uncommitted changes are invisible to it"
- If any condition fails, refuse to execute and explain why

2. **Execute Test Environment**:
Run exactly this command:
Expand Down Expand Up @@ -80,7 +86,8 @@ Do NOT:
### On Invalid Invocation:
If prerequisites aren't met, clearly state:
- "Cannot execute: Host OS is not macOS" OR
- "Cannot execute: No changes detected in @src/pmdas/darwin or @src/pmdas/darwin_proc directory"
- "Cannot execute: No changes detected in @src/pmdas/darwin or @src/pmdas/darwin_proc directory" OR
- "Cannot execute: Uncommitted changes detected in [directory]. Please commit changes first - the VM only sees committed code."

## Edge Cases

Expand Down
22 changes: 18 additions & 4 deletions .claude/skills/macos-qa-test/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,24 @@ Run this command to execute the darwin PMDA QA tests:

## When to Use

- After making changes to `src/pmdas/darwin` or `src/pmdas/darwin_proc`
- Before committing darwin PMDA changes
- To validate new metrics or bug fixes
- When you want to ensure changes work in a clean environment
- After making AND COMMITTING changes to `src/pmdas/darwin` or `src/pmdas/darwin_proc`
- To validate new metrics or bug fixes in a clean environment
- Before pushing changes to remote

## CRITICAL: Git Commit Required

**You MUST commit all source code changes to git BEFORE running this skill.**

The Tart VM clones the git repository. Uncommitted local changes are INVISIBLE to the VM.

```bash
# Correct workflow:
git add <changed-files>
git commit -m "Add new metric for X"
/macos-qa-test # NOW the VM will see your changes
```

If tests fail on code you just wrote, verify you committed the changes first

---

Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/macOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ jobs:
source pybuilddeps/bin/activate
xcodebuild -version
./Makepkgs -verbose
# Validate PMID consistency
- name: Validate PMID Consistency
id: pmid-validation
if: success()
run: |
echo "Validating PMID consistency across pmns, metrics.c, and darwin.h..."
./build/mac/test/integration/test-pmid-consistency.sh
# Darwin PMDA Unit Tests (pre-installation)
- name: Run Darwin PMDA Unit Tests
id: unit-tests
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,4 @@ provisioning/osxsierra.legally.ok
*vgcore.*
tmpfiles.init.setup

/CLAUDE.local.md
43 changes: 43 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ PMDAs collect metrics from specific subsystems. Key directories in `src/pmdas/`:
- **libpcp_trace**: Event trace instrumentation
- **libpcp_import**: Data import for PCP archives

## Available Agents

- `pcp-code-reviewer` - Reviews code against PCP project standards (whitespace, naming, structure, PCP patterns)

## Development Guidelines

### QA Testing Philosophy
Expand Down Expand Up @@ -138,3 +142,42 @@ cd qa && ./check -g archive # Archive tests

### Platform Support
PCP supports Linux, macOS, Windows (MinGW), AIX, and Solaris. Tests should be written to be portable or use `_notrun()` for platform-specific limitations.

## macOS Development (Darwin Platform Only)

When developing on macOS (`Platform: darwin` in environment):

### ⚠️ Critical Constraints

1. **Stage changes before VM tests**
- The Tart VM accesses the filesystem directly — `git add` is the minimum required
- Unstaged changes in `src/pmdas/darwin*` AND `build/mac/` are INVISIBLE to the VM
- A full commit also works; either way, run `/macos-qa-test` after staging

Comment thread
tallpsmith marked this conversation as resolved.
2. **Test environments**
- Unit tests: Run locally (no PCP needed)
- Integration tests: Tart VM only (`/macos-qa-test`)

### macOS-Specific Agent

- `macos-darwin-pmda-qa` - Runs integration tests in isolated Tart VM

### Quick Start
```bash
./Makepkgs --verbose # One-time: full build (5-30 min)
cd build/mac/test && ./run-all-tests.sh # Daily: build + test (20-30s)
```

### Key Directories

| Directory | Purpose |
|-----------|---------|
| `build/mac/` | Test orchestration, PKG packaging, Tart VMs |
| `dev/darwin/` | Quick-compile tools (~10s vs 30min) |
| `src/pmdas/darwin/` | Darwin PMDA source code |
| `src/pmdas/darwin_proc/` | Darwin process PMDA source |

### Documentation

- `build/mac/CLAUDE.md` - Development workflow, test commands
- `build/mac/MACOS_DEVELOPMENT.md` - Tart VM clean-room builds
45 changes: 37 additions & 8 deletions build/mac/README.md → build/mac/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@

Fast iteration tools for Darwin PMDA development on macOS.

## ⚠️ macOS Development Constraints

1. **PCP is NOT installed locally** - Don't run `pminfo`/`pmval`/`pmprobe`. Read `src/pmdas/darwin/pmns` instead.
2. **Commit before VM tests** - Tart VM only sees committed git changes.
3. **Unit tests = local, Integration tests = VM only**

### Git Commit Requirement

**ALL changes MUST be committed to git BEFORE running Tart VM tests.**

This includes:
- Source code changes (`src/pmdas/darwin*`)
- Build/test scripts in THIS directory (`build/mac/`)
- Installation scripts, test fixtures, etc.

The Tart VM clones the git repository - uncommitted local changes are invisible to it.

---

## Prerequisites (One-Time Setup)

PCP must be fully built before using quick builds:
Expand All @@ -15,7 +34,7 @@ This takes 5-30 minutes and only needs to be done once. It generates headers, bu

**Verify setup:**
```bash
cd dev/darwin/dev
cd dev/darwin
make check-deps
```

Expand All @@ -31,7 +50,7 @@ Builds PMDA (~5-10s) and runs unit tests (~10-20s). Runs integration tests if pm

### Build Only
```bash
cd dev/darwin/dev
cd dev/darwin
make clean && make
```

Expand All @@ -52,11 +71,15 @@ cd build/mac/test
./run-unit-tests.sh
```

**Integration tests** (requires PCP installed and pmcd running):
```bash
cd build/mac/test/integration
./run-integration-tests.sh
```
**Integration tests** (Tart VM only - do NOT run locally):

Integration tests require PCP installed and pmcd running. The Tart VM provides this environment.

**Before running:**
1. Commit all changes to git (source code AND build/mac scripts)
2. Use `/macos-qa-test` skill or `macos-darwin-pmda-qa` agent

The VM clones the git repo, so uncommitted changes are invisible

### Centralized Test Orchestration
Quick test runners available in `build/mac/test/`:
Expand All @@ -68,7 +91,13 @@ Quick test runners available in `build/mac/test/`:

1. Edit source: `src/pmdas/darwin/pmda.c`
2. Update PMNS: `src/pmdas/darwin/pmns`
3. Quick build: `cd dev/darwin/dev && make`
3. Quick build: `cd dev/darwin && make`
4. Add test: `src/pmdas/darwin/test/test-<cluster>.txt`
5. Run tests: `cd build/mac/test && ./run-all-tests.sh`

## Detailed Documentation

For in-depth procedures and troubleshooting:
- `MACOS_DEVELOPMENT.md` - Tart VM setup for clean-room builds
- `qa/TESTING.md` - pmcd launchctl test plan

Loading
Loading