Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert options for perf_map and maps_files #47

Merged
merged 1 commit into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion stacks/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,13 +417,14 @@ impl State {
match event {
Received::ProcessExec(event) => {
let (exe, mtime, buildid) = exe_change_time_build_id(event.tgid)?;
let comm = null_terminated(&event.comm);
debug!(executable = ?exe, tgid = event.tgid, "process started");
self.state_writer_sender.send(WriterRequest::ProcessCreated(
event.tgid,
exe,
mtime,
buildid.clone(),
))?;
let comm = null_terminated(&event.comm);
match self.tgid_process_info.entry(event.tgid) {
hash_map::Entry::Vacant(vacant) => {
vacant.insert(ProcessInfo {
Expand Down
25 changes: 9 additions & 16 deletions stacks/src/symbolizer.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::{
collections::{HashMap, HashSet},
iter::empty,
num::NonZeroU32,
path::PathBuf,
rc::Rc,
};
Expand Down Expand Up @@ -88,14 +87,14 @@ pub(crate) fn symbolize(symbolizer: &BlazesymSymbolizer, stacks: &impl Frames, s
let process_symbolizer = match symbolizer.symbolize_userspace(tgid as u32) {
Ok(sym) => sym,
Err(err) => {
debug!("symbolizing process {}: {}", tgid, err);
debug!("get userspace symbolizer {}: {}", tgid, err);
continue;
}
};
let symbols = match process_symbolizer.symbolize(&req) {
Ok(syms) => syms,
Err(err) => {
debug!("symbolizing process {}: {}", tgid, err);
debug!("get symbols {}: {}", tgid, err);
continue;
}
};
Expand Down Expand Up @@ -210,28 +209,22 @@ impl BlazesymSymbolizer {
source: Process {
pid: Pid::Pid(tgid.try_into()?),
debug_syms: true,
perf_map: true,
map_files: true,
perf_map: false,
map_files: false,
_non_exhaustive: (),
},
exe: exe.clone(),
mtime,
});
debug!("symbolizer for tgid={} with executable {:?} initialized", tgid, exe);
debug!(executable = ?exe, tgid, "symbolizer initialized");
self.executable_symbolizers.insert((exe, mtime), symboliser.clone());
self.process_symbolizers.insert(tgid, symboliser);
}
if let Some(symbolizer) = self.process_symbolizers.get(&tgid) {
if let Err(err) = symbolizer.symbolizer.symbolize(
&Source::Process(Process {
pid: blazesym::Pid::Pid(NonZeroU32::new(tgid).unwrap()),
debug_syms: true,
perf_map: false,
map_files: false,
_non_exhaustive: (),
}),
Input::AbsAddr(&[]),
) {
if let Err(err) = symbolizer
.symbolizer
.symbolize(&Source::Process(symbolizer.source.clone()), Input::AbsAddr(&[]))
{
debug!("caching unsuccesful for tgid={} err={}", tgid, err);
}
}
Expand Down