Manuscript Offprint
arXiv:2609.35508Argus: Agentic, Reference-Calibrated, Tree-Guided, System-Software-Level Bottleneck Localization
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Argus: , , Tree- , Bottleneck Localization
Vlad-Petru Nitu Harsh Songara Konstantinos Sgouras
Spiros Galanopoulos Konstantinos Kanellopoulos Onur Mutlu
ETH Zürich
Abstract. Operating system (OS) code can account for a substantial share of CPU execution time. First, as application logic is offloaded to heterogeneous accelerators (e.g., GPUs), the CPU increasingly acts as an orchestrator, spending cycles in driver calls, data movement, and synchronization rather than in application code. Second, workloads such as serverless functions frequently invoke OS services. At the same time, the OS is a complex codebase spanning many subsystems (e.g., memory management, networking), making it hard to localize the specific code path responsible for a slowdown. Existing profilers expose measurements that require interpretation (e.g., perf and Intel VTune) or can perturb short operations when extensively instrumented (e.g., ftrace). Diagnosing OS bottlenecks can therefore require repeated kernel instrumentation and manual interpretation.
We introduce Argus, an agentic LLM-based profiler that produces instrumentation code and autonomously (i.e., without human intervention) reasons over potential OS-level bottlenecks. Argus integrates two key mechanisms: (i) a calibration methodology that involves collecting a measurement from an idle system and using it as a reference point to discover potential bottlenecks, and (ii) a tree-based data structure that represents the different OS execution paths, improving the agent's bottleneck localization accuracy. Argus aims to identify a specific kernel code path rather than stop at a subsystem-level diagnosis. In two case studies, we employ Argus to autonomously discover bottlenecks present in the memory management subsystem caused by (i) a THP aggressor co-running with other applications, and (ii) applications that incur different types of page faults. Argus produces fewer incorrect deep-path diagnoses than the strongest evaluated LLM-based baseline, which lacks reference calibration, while preserving low time-to-diagnosis ( ).
What existing profilers miss. We group representative profilers into six classes. (1) Time-based samplers (e.g., perf using software clock events [11]) reveal where CPU time is spent, but not why. (2) Hardware-event samplers (e.g., perf using PMU events [11]–[14]) cannot directly measure how long a thread waits for OS services. (3) Static tracepoints expose predefined kernel events [11], [15], [16]; their overhead rises with event frequency and the work done per event (e.g., recording a stack trace). (4) Continuous profilers (e.g., Grafana Pyroscope [17]–[19]) collect CPU samples, which cannot measure blocking time (e.g., how long a thread waits to acquire a kernel mutex) [20], [21]. (5) Accelerator profilers include NVIDIA Nsight Systems, which traces GPU activity and host-device calls [22], and AMD Omniperf, which reports GPU-kernel metrics [23]. Nsight Systems can also sample host-kernel stacks [24]. Argus uses its reference profile and kernel tree to select finer probes. (6) Dynamic instrumentation systems (e.g., DTrace and SystemTap [25], [26]) can attach probes without recompilation. Linux kprobes supports most kernel instruction addresses [27]. However, writing these hooks requires kernel expertise, severely limiting the adoption of such tools.
Extended Berkeley Packet Filter (eBPF) programs [28] enable programmable kernel instrumentation at supported hooks and serve as the basis for tools such as bpftrace [29] and eunomia [30]. eBPF is backed by a verifier [31] that statically checks each program for properties such as bounded execution and valid memory access before loading it into the kernel. Once loaded, eBPF code can aggregate measurements in kernel maps, reducing the volume of data copied to user space. We quantify eBPF's overhead against other profilers (e.g., ftrace) in §3.
However, flexible kernel instrumentation has two key limitations. First, it requires manual authoring of complex eBPF code, which demands familiarity with kernel internals, making it unsuitable for developers without deep kernel expertise. We call this the authoring gap. Second, these profiling tools still leave the interpretation of results and the choice of follow-up probes to the user. We call this the interpretation gap. This gap arises because bottleneck localization is an iterative process: starting from coarse subsystem-level signals, the engineer progressively narrows the search to the specific kernel execution path.
responsible for the slowdown. Each iteration demands expertise: interpreting the current measurement, instrumenting the next finer-grained probe, and re-profiling. BIS and GAPP identify serialization bottlenecks in multithreaded applications [32], [33]; Haecki et al. diagnose end-host network latency [34]. These methods do not use a kernel code-path hierarchy and an idle-system reference to choose which functions to probe next. Ideally, a diagnosis tool should reach the kernel execution path responsible for the bottleneck, rather than stop at the broader subsystem.
LLM-based agents create a new opportunity. Recent LLM-based agents [35], [36] can author code and use tool feedback to reason about a task, creating an opportunity to close both the authoring and interpretation gaps. However, naively using agents for system-level profiling has three limitations. First, an agent needs a reference value: only a significant deviation of the observed measurement from this reference indicates a bottleneck. Second, such reference values are noisy and vary across hardware configurations. Third, without a structured view of the kernel's code paths, the agent invents function names or guesses an incorrect fine-grained diagnosis. We quantify the impact of all three limitations in §3.
Our goal in this work is to develop an autonomous OS-level profiling methodology that is low-overhead, programmable, and supports dynamic instrumentation, while closing the authoring and interpretation gaps. To this end, we propose Argus, an agentic profiler that integrates an LLM-based agent with two complementary mechanisms: reference calibration against an idle-system profile, and a tree-based data structure that represents the different OS execution paths. Argus descends the tree one level at a time, comparing each level's measurements against the idle-system reference to decide whether to commit to the flagged code path or descend deeper.
Across a (victim, perturber) matrix of five workloads and four perturbations, Argus produces fewer incorrect deep-path diagnoses than the strongest evaluated baseline (i.e., Argus without reference calibration), at comparable time-to-diagnosis ( vs. ).
In this work, we make the following contributions: (i) we propose Argus, an autonomous OS-level profiler that employs an LLM agent to localize bottlenecks in OS code; (ii) we compare three baselines that omit reference calibration and/or tree-guided traversal, observing incorrect-diagnosis rates higher than Argus's; and (iii) we use Argus to autonomously discover bottlenecks in two memory-management case studies.
2 Argus: Key Idea, Overview, and Mechanism
We propose Argus, an agentic profiler that autonomously diagnoses system-level performance bottlenecks down to the responsible OS code path. The key idea of Argus is to guide the LLM agent via two complementary mechanisms: (i) reference calibration, which compares the agent's measurements against a baseline profile of the workload collected on an idle reference system, and (ii) tree-guided kernel traversal, which constrains the agent's exploration to a static, hierarchical tree of kernel code paths built offline. By doing so, Argus validates bottleneck hypotheses under perturbation while avoiding hallucinated, non-existent code paths. This enables autonomous bottleneck localization at code-path granularity, without expert intervention.
Fig. 1 illustrates Argus’s high-level components. The reference and perturbed measurement vectors (RMV/PMV) each capture perf counters and per-code-path latencies. Argus operates in six steps. ① The user selects a workload M to profile. ② Argus profiles M on an idle system using perf [11] and eBPF probes, yielding the RMV. ③ The agent authors a single multiplexed eBPF probe (i.e., one program that hooks every branch of the tree at the current level L). ④ Argus profiles M on the perturbed system using the loaded eBPF probe, yielding the PMV. ⑤ Argus computes for each measured kernel-path metric . is used to compare PMV against RMV element-wise to decide whether to terminate the search (i.e., no bottleneck found), or descend one level deeper into the flagged subtree (i.e., significant deviation in at least one dimension of the vector), in which case it returns to step ③. ⑥ Upon termination, Argus reports the final diagnosis: the flagged kernel code path, or no bottleneck found, if Argus abstained (i.e., no measured value in the PMV deviates significantly from its reference in the RMV).

Fig. 1: Overview of Argus's key components.
Hierarchical subsystem tree. Fig. 2 shows the paging branch of Argus's static kernel code-path tree. Level 1 identifies a kernel subsystem (e.g., kernel paging). Level 2 breaks it into paths such as file_fault, anon_fault, and TLB shootdown. Level 3 refines anon_fault into CoW, minor, and THP paths. The tree bounds this traversal to three levels, with one multiplexed probe per level.
Reference profiling ②. Argus produces the RMV by profiling workload M on an idle reference system, which serves as the baseline against which the agent later detects deviations under perturbation. Argus profiles M under perf [11] and multiplexed eBPF probes to populate the RMV with per-code-path call counts and latency numbers (e.g., do_anonymous_page).
An LLM-based agent is a large language model (LLM) that interacts with external tools in a loop: it observes outputs, decides on an action, executes it, and repeats until it completes the task.

Fig. 2: The paging branch of Argus’s three-level kernel code-path tree.
Agent profiling closed loop ③-4. At each level L, the agent performs three steps to produce the PMV. (i) Generate: the agent generates eBPF source code that hooks the level-L code paths in the active subtree (i.e., the subtree rooted at the path flagged at level L-1, or the entire tree at L=1). At L=2 and L=3, the agent multiplexes all hooks into a single eBPF program that shares counters through one eBPF map [37], such that one program covers the entire subtree. (ii) Verify and load: the agent submits the generated program to the eBPF verifier. If the verifier accepts the program, Argus loads it into the kernel. Otherwise, the agent re-prompts itself with the verifier's diagnostic message in a ReAct loop [38], and repeats step (i) until the program is accepted. (iii) Measure: Argus runs M on the perturbed system, and collects the counters sampled using the code generated in step (i) into the PMV.
Bottleneck detection and diagnosis reporting 5-6. For each dimension i, Argus computes and flags dimensions with (the confidence condition; we set empirically). If no dimension is flagged, Argus reports no bottleneck found. If at least one dimension is flagged and L is a leaf, Argus reports the flagged path as the bottleneck (e.g., kernel_paging anon_fault minor). If at least one dimension is flagged but L is not a leaf, Argus descends one level into the flagged child subtree and returns to step 3. By combining reference calibration with tree guidance, Argus traverses at most three tree levels before reporting or abstaining.
3 Evaluation
To isolate the contribution of each component, we define three baselines. (i) B-LLM-Prior: the agent receives no reference profile and descends solely based on LLM's prior knowledge. This is the weakest baseline we evaluate, and isolates the contribution of using LLMs' intuition naively in an agentic profiler. (ii) B-LLM-Prior-Tree: B-LLM-Prior augmented with a static tree data structure that reflects a subset of the Linux source code, isolating the contribution of tree-guided traversal. (iii) B-LLM-Prior-Tree-Probes: augments B-LLM-Prior-Tree by using an LLM-based agent to write eBPF code at every level of the tree, which guides bottleneck localization with measured counters. Unlike Argus, this baseline omits reference calibration. This baseline isolates the benefit of guiding tree traversal using measured counters.
Accuracy. We construct a (victim, perturber) matrix that pairs five representative workloads with four perturbations (e.g., disable THP), and run each baseline three times per cell. We define a hallucination as a bottleneck diagnosis at a deep code path that does not match the cell's true bottleneck. Hallucinations are either wrong attributions (real kernel functions the workload does not exercise), or fabrications (function names absent from the kernel, e.g., alloc_cold). Fig. 3 reports the number of hallucinated diagnoses per (victim, perturber) cell for each baseline. We make four key observations. First, B-LLM-Prior hallucinates even on simple microbenchmarks because it bases its decisions on the perturber's name rather than the victim's actual access pattern. Second, B-LLM-Prior fabricates kernel function names (e.g., alloc_cold, page_alloc), since it lacks a structured view of the kernel's code paths, which Argus provides through the tree-based data structure. Third, without a reference measurement, B-LLM-Prior has no notion of deviation and cannot recognize null cells (i.e., no bottleneck), sometimes committing deeply in the tree with little confidence. In contrast, Argus correctly abstains when the perturbation has no measurable effect.
Fourth, providing the tree-based data structure associated with the kernel (B-LLM-Prior-Tree, B-LLM-Prior-Tree-Probes) removes fabricated hallucinations entirely, since the tree restricts the bottleneck localization to existing kernel functions. However, B-LLM-Prior-Tree still descends deep without enough evidence, sometimes hallucinating more than B-LLM-Prior. B-LLM-Prior-Tree-Probes outperforms the other two LLM-based baselines, but it does not match Argus: without a reference measurement, its probes cannot establish whether a measured value deviates from normal operation. We conclude that enhancing the agentic traversal with a tree that mirrors the kernel, without a reference profile, is insufficient to achieve high bottleneck localization accuracy, motivating the synergistic interplay of reference calibration and tree-guidance.
Fig. 4 aggregates these results across all (victim, perturber) pairs. We make two key observations. First, Argus makes an incorrect deep-path diagnosis in one of 60 runs (1.7%), compared to 27 of 60 runs (45%) for B-LLM-Prior and 31 of 60 runs (51.7%) for B-LLM-Prior-Tree (27× and 31× higher rates, respectively). B-LLM-Prior-Tree-Probes makes incorrect diagnoses in 19 of 60 runs (31.7%). Compared with this best-performing baseline, Argus has a 19× lower incorrect-diagnosis rate. Second, while B-LLM-Prior terminates exploration when uncertain, B-LLM-Prior-Tree descends the tree without sufficient evidence, misidentifying the code path on which the bottleneck lies. These results show that, in this matrix, adding a tree and probes without reference calibration does not prevent incorrect deep-path diagnoses.
Overhead analysis. Fig. 5 quantifies the CPU execution time overhead per kernel function call on a fault-heavy microbenchmark (pf_anon_write × p1, which sustains 2.6M do_anonymous_page calls over 3s). We make three key observations. First, ftrace's [39] func_graph tracer emits entry and exit events for each traced function call, incurring 11.9 μs per call in this setup. Second, a count-only eBPF kprobe p1 = THP off • p2 = drop_caches • p3 = THP aggressor • p4 = LLC pollute

Fig. 3: Per-cell hallucinated diagnoses across (victim, perturber) pairs, for Argus and three LLM baselines.

Fig. 4: Incorrect deep-path diagnosis rate across all (victim, perturber) pairs. Argus's rate is lower than the evaluated LLM-based baselines.
reduces this overhead by , to 49 ns per call, but loses per-call latency information. Third, an eBPF kprobe+kretprobe pair that captures per-call entry/exit latency in-kernel incurs 201 ns per call, at only more than the count-only probe, but less than ftrace. We conclude that the kprobe+kretprobe configuration represents the sweet spot between low overhead and diagnostic signal: at a fraction of ftrace's cost, provides the agent with the per-call latency it needs to attribute slowdowns to specific kernel code paths. Argus therefore adopts this configuration.

Fig. 5: CPU execution time overhead (log scale) of three kernel-tracing options over an uninstrumented baseline: ftrace's func_graph, an eBPF kprobe that only counts events, and an eBPF kprobe+kretprobe that captures per-call latency .
Time-to-Diagnosis. We evaluate the median time-to-diagnosis (TtD) of Argus and the three baselines defined above, on the same (victim, perturber) matrix used in the hallucination study (Fig. 3). We make two key observations. First, Argus has a TtD in the same range as the LLM-prior baselines: its 30.9 s median is on par with all three (B-LLM-Prior: 33.4 s, B-LLM-Prior-Tree: 26.3 s, B-LLM-Prior-Tree-Probes: 28.7 s), despite the additional reference profiling and reference calibration steps that Argus performs. Second, B-LLM-Prior is 17% slower than the average of the other three configurations, because the agent oscillates between subsystem hypotheses without a tree to guide its traversal. In this evaluation, reference calibration adds little to median TtD while reducing incorrect deep-path diagnoses.
4 Case Studies
We demonstrate Argus in two case studies: (1) per-victim diagnosis under a THP aggressor, and (2) disambiguating which code paths different page-fault types stress within the paging module of the memory management subsystem.
Case Study 1: THP aggressor. Fig. 6 shows Argus's outcomes for six victim workloads co-running with p10_thp_aggressor. This workload fragments physical memory and then forces compaction by requesting huge pages. Prior work also examines huge-page performance under memory fragmentation [40]. First, gups and stream (3/3 abstain) pre-allocate in userspace, so the aggressor never reaches their hot path. Thus, Argus abstains for both workloads in all three repetitions. Second, pf_anon_write (3/3 correct) commits to kernel_paging at L1 in 2/3 reps. Third, llama_cpp (3/3 correct) exposes a non-obvious kernel-paging signal: although GPU-bound, its memory-mapped model file generates file_fault activity under the aggressor's page-cache pressure, while KV-cache growth drives anon_fault. Argus commits to kernel_paging at L2. Fourth, for fork_storm, Argus correctly commits to kernel_scheduler.load_balance at leaf level 2/3 times. Fifth, pf_cow (3/3 abstain) exposes a tree limitation: the THP tax spreads across mmap_lock, slab, and RCU paths that the kernel tree of code paths does not contain.
The missing paths in the current tree limit the diagnosis for pf_cow. We leave expanding the tree (e.g., auto-generating it) as future work.

Fig. 6: Argus's diagnosis outcomes for six victim workloads co-running with p10_thp_aggressor. Each bar shows three repetitions, grouped by diagnosis depth or abstention; the numbers on the bars represent repetition counts.

Fig. 7: Page-fault disambiguation: signatures of five page-fault perturbers across three kernel code paths: anon_fault, file_fault, and tlb_flush.
Case Study 2: Page-fault disambiguation. Fig. 7 reports the measured by Argus for five page-fault perturbers across three kernel code paths: anon_fault, file_fault, and tlb_flush. The pf_cow workload exercises Copy-on-Write, whose page copying can add substantial memory-management cost [41]. Three clusters emerge. First, the anon_fault cluster (pf_anon_write, pf_cow, pf_zero_page) shows high on the anonymous path and near-zero on the file-backed path, confirming that anonymous and file-backed workloads exercise disjoint kernel paths. Second, in file_fault, pf_major exhibits higher than pf_page_cache, separating “file-backed fault” from “file-backed fault with disk I/O.” Third, the tlb_flush cluster (pf_cow, pf_major) shows lower , since TLB invalidations are events that fire only on Copy-on-Write and swap-in remapping.
We conclude that the five perturbers resolve into four signature classes: (1) anon-only (pf_anon_write, pf_zero_page); (2) anon+TLB (pf_cow); (3) file-backed-light (pf_page_cache); and (4) file-backed-with-IO (pf_major). Argus recovers the kernel's page-fault taxonomy without prior knowledge about the perturber.
References
[1] S. Kanev et al., “Profiling a Warehouse-Scale Computer,” in ISCA, 2015.
[2] K. Kanellopoulos et al., “Virtuoso: Enabling Fast and Accurate Virtual Memory Research via an Imitation-based Operating System Simulation Methodology,” in ASPLOS, 2025.
[3] J. L. Hennessy and D. A. Patterson, “A New Golden Age for Computer Architecture,” Communications of the ACM, vol. 62, no. 2, 2019.
[4] N. P. Jouppi et al., “In-Datacenter Performance Analysis of a Tensor Processing Unit,” in ISCA, 2017.
[5] Linux Kernel Contributors, “AMDGPU: Linux Kernel Driver for AMD GPUs,” https://docs.kernel.org/gpu/amdgpu/index.html, accessed: 2026-05-07.
[6] R. Ausavarungnirun et al., “Mosaic: A GPU Memory Manager with Application-Transparent Support for Multiple Page Sizes,” in MICRO, 2017.
[7] L. A. Barroso et al., “Attack of the Killer Microseconds,” Communications of the ACM, vol. 60, no. 4, 2017.
[8] S. Cho et al., “Taming the Killer Microsecond,” in MICRO, 2018.
[9] A. Agache et al., “Firecracker: Lightweight Virtualization for Serverless Applications,” in NSDI, 2020.
[10] Y. Gan et al., “An Open-Source Benchmark Suite for Microservices and Their Hardware-Software Implications for Cloud & Edge Systems,” in ASPLOS, 2019.
[11] Linux Kernel, “perf: Linux profiling with performance counters,” https://perfwiki.github.io/main/, accessed: 2026-04-24.
[12] Intel Corporation, “Intel VTune Profiler,” https://www.intel.com/content/www/us/en/developer/tools/oneapi/vtune-profiler.html, accessed: 2026-04-24.
[13] Advanced Micro Devices, “AMD μProf Profiler,” https://www.amd.com/en/developer/uprof.html, accessed: 2026-04-24.
[14] A. Yasin, “A Top-Down Method for Performance Analysis and Counters Architecture,” in ISPASS, 2014.
[15] M. Desnoyers and M. R. Dagenais, “The LTTng tracer: A low impact performance and behavior monitor for GNU/Linux,” in OLS, 2006.
[16] M. Desnoyers, “Using the Linux Kernel Tracepoints,” https://docs.kernel.org/trace/tracepoints.html, accessed: 2026-09-28.
[17] Grafana Labs, “Grafana Pyroscope: Continuous Profiling,” https://grafana.com/oss/pyroscope/, accessed: 2026-04-24.
[18] Polar Signals, “Parca: Continuous Profiling for Analysis of CPU and Memory Usage,” https://www.parca.dev/, accessed: 2026-04-24.
[19] Datadog, “Datadog Continuous Profiler,” https://docs.datadoghq.com/profiler/, accessed: 2026-04-24.
[20] Grafana Labs, “Profiling Types and Their Uses,” https://grafana.com/docs/pyroscope/latest/introduction/profiling-types/, accessed: 2026-09-28.
[21] Datadog, “Profile Types,” https://docs.datadoghq.com/profiler/profile_types/, accessed: 2026-09-28.
[22] NVIDIA Corporation, “NVIDIA Nsight Systems,” https://developer.nvidia.com/nsight-systems, accessed: 2026-04-25.
[23] Advanced Micro Devices, “Omniperf Documentation,” https://rocm.docs.amd.com/projects/omniperf/en/docs-6.2.4/, accessed: 2026-04-25.
[24] NVIDIA Corporation, “Nsight Systems User Guide,” https://docs.nvidia.com/nsight-systems/UserGuide/, accessed: 2026-09-28.
[25] B. M. Cantrill et al., “Dynamic Instrumentation of Production Systems,” in USENIX ATC, 2004.
[26] V. Prasad et al., “Locating System Problems Using Dynamic Instrumentation,” in OLS, 2005.
[27] J. Keniston et al., “Kernel Probes (Kprobes),” https://docs.kernel.org/trace/kprobes.html, accessed: 2026-09-28.
[28] B. Gbadamosi et al., “The eBPF Runtime in the Linux Kernel,” 2024. [Online]. Available: https://arxiv.org/abs/2410.00026
[29] bpftrace Project, “bpftrace: High-level Tracing Language for Linux,” https://github.com/bpftrace/bpftrace, accessed: 2026-04-24.
[30] eunomia-bpf Project, “eunomia-bpf: A Dynamic Loading Library and Compile Toolchain for eBPF,” https://github.com/eunomia-bpf/eunomia-bpf, accessed: 2026-04-24.
[31] Linux Kernel Contributors, “eBPF verifier,” https://docs.kernel.org/bpf/verifier.html, accessed: 2026-05-07.
[32] J. A. Joao et al., “Bottleneck Identification and Scheduling in Multi-threaded Applications,” in ASPLOS, 2012.
[33] R. Nair and T. Field, “GAPP: A Fast Profiler for Detecting Serialization Bottlenecks in Parallel Linux Applications,” in ICPE, 2020, arXiv:2004.05628.
[34] R. Haecki et al., “How to Diagnose Nanosecond Network Latencies in Rich End-host Stacks,” in NSDI, 2022.
[35] Anomaly, “OpenCode: The open source AI coding agent,” https://opencode.ai, source repository: https://github.com/anomalyco/opencode. Accessed: 2026-05-07.
[36] A. Novikov et al., “AlphaEvolve: A Coding Agent for Scientific and Algorithmic Discovery,” Google DeepMind White Paper. https://arxiv.org/abs/2506.13131, 2025, arXiv:2506.13131.
[37] ebpf.io Authors, “eBPF Maps,” https://docs.ebpf.io/linux/concepts/maps/, accessed: 2026-05-07.
[38] S. Yao et al., “ReAct: Synergizing Reasoning and Acting in Language Models,” in ICLR, 2023, arXiv:2210.03629.
[39] S. Rostedt, “ftrace: Function Tracer for the Linux Kernel,” https://www.kernel.org/doc/html/latest/trace/ftrace.html, accessed: 2026-04-24.
[40] K. Kanellopoulos et al., “Revelator: Rapid Data Fetching via System-Software-Guided Hash-based Speculative Address Translation,” in ISCA, 2026.
[41] V. Seshadri et al., “Page Overlays: An Enhanced Virtual Memory Framework to Enable Fine-grained Memory Management,” in ISCA, 2015.