Port profiler changes from CppNix #881

Open
opened 2025-06-25 22:09:11 +00:00 by jade · 1 comment
Owner

Recently CppNix gained a very simple stack trace sampling profiler, which is something which is important to not guessing in the dark while trying to understand eval performance and which we would independently like to have. I am not certain if this is an ideal architecture for this as I discovered in my experiments with tracing profiling that uses a string interner that full tracing profiling had basically no perf effects. Regardless, the patch is simple and seemingly self contained, so we probably could pick it, assuming no surprises exist in its implementation.

Relevant PRs:

Required steps:

  1. Discuss with @pennae (@raito was intending to do this)
  2. Port the patches
Recently CppNix gained a very simple stack trace sampling profiler, which is something which is important to not guessing in the dark while trying to understand eval performance and which we would independently like to have. I am not certain if this is an ideal architecture for this as I discovered in my experiments with tracing profiling that uses a string interner that full tracing profiling had basically no perf effects. Regardless, the patch is simple and seemingly self contained, so we probably could pick it, assuming no surprises exist in its implementation. Relevant PRs: - https://github.com/NixOS/nix/pull/13219 - https://github.com/NixOS/nix/pull/13261 Required steps: 1. Discuss with @pennae (@raito was intending to do this) 2. Port the patches
Owner

we're definitely not porting these as is. we have an ast visitor infrastructure that can inject profiling nodes only when profiling is requested instead of always having it on hot paths (even if it's cheap enough to not notice most of the time)

we're definitely not porting these as is. we have an ast visitor infrastructure that can inject profiling nodes only when profiling is requested instead of always having it on hot paths (even if it's cheap enough to not notice most of the time)
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#881
No description provided.