Wprof host/kernel and user-provided metadata support#59
Merged
Conversation
Running ./wprof -R with no -T, -J, -I, or --req-list silently did nothing. Detect this and report an error with the expected options. Signed-off-by: Andrii Nakryiko <[email protected]>
Emit a warning early if euid != 0, since BPF operations require root. Proceed anyway to let the user see the actual failure. Signed-off-by: Andrii Nakryiko <[email protected]>
Add fmt_timestamp_ns() helper that formats a realtime_ns epoch value as an ISO 8601 UTC timestamp (e.g., "2026-04-22T18:47:58.231Z"). Uses gmtime() so the displayed time is timezone-independent. Display the capture timestamp in --replay-info and emit it as "timestamp" in the JSON header. Signed-off-by: Andrii Nakryiko <[email protected]>
Allow attaching arbitrary key=value metadata to a recording via repeatable -M/--metadata flag. Keys and values are trimmed of whitespace. Hostname and kernel version are captured automatically. Metadata is persisted as WEXTRA_METADATA extras in the data file, displayed in --replay-info under a "Metadata:" section, and emitted as a "metadata" JSON object in JSON trace output. Signed-off-by: Andrii Nakryiko <[email protected]>
Emit capture-time extras (filters, utrace defs) as a JSON "extras" array and metadata as a "metadata" object in the JSON header. Signed-off-by: Andrii Nakryiko <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
And a bunch of small UX improvements.