From 953878eff4f26fe4a5fb1d40c007f709e4cdc983 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 16 Oct 2023 08:57:15 -0700 Subject: [PATCH] Fix profiling the first function in a module This commit removes a clause in `register_module` which was preventing `perf` profiling the first function in a module because it was located at address 0. This check is relatively dated at this point and I think I originally added it in error (and/or it was copied from somewhere else), so this commit removes it. --- crates/jit/src/profiling.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/jit/src/profiling.rs b/crates/jit/src/profiling.rs index 5e24344ac915..06edec82f6aa 100644 --- a/crates/jit/src/profiling.rs +++ b/crates/jit/src/profiling.rs @@ -76,7 +76,7 @@ pub trait ProfilingAgent: Send + Sync + 'static { } let address = sym.address(); let size = sym.size(); - if address == 0 || size == 0 { + if size == 0 { continue; } if let Ok(name) = sym.name() {