summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-06-09 22:24:30 +0300
committerPaul Buetow <paul@buetow.org>2026-06-09 22:24:30 +0300
commitf601dc90fcef3f270c55a9612c5f0326dbd0f391 (patch)
treef77fb46bebc8263fdac31ae1f517dd82ed8ddf15 /docs
parent7031211501884555139351bb676fc0592c9df14c (diff)
feat(parquet): export rename/link oldname + assert oldname capture end-to-end
rename-family (rename/renameat/renameat2) and link-family (link/linkat/ symlink/symlinkat) capture BOTH paths in BPF (name_event.oldname at args[1] for the AT-variants, after a dirfd, plus newname), but only newname reached any persisted output. event.Pair.FileName() resolves to oldnameNewnameFile.Name() == Newname, so the parquet `file` column, CSV, and flamegraph Path all carried newname; the captured oldname survived only in the TUI stream String() repr ("old:... ->new:..."). The oldname capture (and its args[1] index for the AT-variants) was therefore never validated end-to-end, and a wrong-oldname-index regression would surface in no persisted output or test. Surface oldname as one additive, backward-compatible column, mirroring the dedicated optional-column convention (address_space_bytes, requested_sleep_ns, epoll_*): - old_file (String): source/old path for rename/link syscalls; empty for every other syscall. The existing `file` column keeps its semantics (newname for rename/link). Data flows name_event.oldname -> event.Pair.Oldname (populated in handleNameExit alongside the existing File) -> streamrow.Row.OldName -> parquet.Record.OldFile. Docs (docs/parquet-querying.md) and the Magefile parquetValidate column list updated in lockstep. The new TestRenameRenameatOldnameInParquet integration test exercises the renameat AT-variant (oldname at args[1] after the olddfd dirfd) and asserts the parquet old_file column carries renameat-old.txt while file carries renameat-new.txt, and that old_file stays empty for non-rename/ link rows -- locking in the args[1] oldname capture end-to-end. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/parquet-querying.md6
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/parquet-querying.md b/docs/parquet-querying.md
index 2ebf16e..b47ac8e 100644
--- a/docs/parquet-querying.md
+++ b/docs/parquet-querying.md
@@ -32,7 +32,8 @@ state, no installation needed beyond Docker.
| `bytes` | UInt64 | Bytes transferred (0 if not applicable) |
| `address_space_bytes` | UInt64 | Memory-region extent for memory syscalls (e.g. `munmap`/`mremap`); 0 otherwise |
| `requested_sleep_ns` | Int64 | Requested sleep duration for nanosleep-style syscalls; 0 otherwise |
-| `file` | String | File path (empty if not resolved) |
+| `file` | String | File path (empty if not resolved); for rename/link syscalls this is the "new" path |
+| `old_file` | String | Source/old path for rename-family (`rename`/`renameat`/`renameat2`) and link-family (`link`/`linkat`/`symlink`/`symlinkat`) syscalls; empty for other syscalls |
| `is_error` | Bool | True when `ret` is a negative errno |
| `filter_epoch` | UInt64 | Filter generation at capture time |
| `epoll_op` | String | `epoll_ctl` operation (`ADD`/`MOD`/`DEL`); empty for other syscalls |
@@ -89,6 +90,7 @@ bytes UInt64
address_space_bytes UInt64
requested_sleep_ns Int64
file String
+old_file String
is_error Bool
filter_epoch UInt64
epoll_op String
@@ -230,6 +232,6 @@ PARQUET_FILE=ior-recording-20260313-170234.parquet env GOTOOLCHAIN=auto mage par
```
It checks:
-1. All 20 expected columns are present
+1. All 21 expected columns are present
2. Row count > 0
3. `seq` is monotonically ordered and `time_ns` is non-zero