Skip to content

Commit

Permalink
Rename --merge-threads to --reuse-threads.
Browse files Browse the repository at this point in the history
Neither name is good. I wanted to move away from --merge-threads because
in the future we might wan to add a feature which merges all threads
(not just non-overlapping threads) into a single output thread.
  • Loading branch information
mstange committed Feb 29, 2024
1 parent 08f3329 commit 8dbad1c
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion samply/src/import/perf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ where
cache,
extra_dir,
interpretation.clone(),
conversion_props.merge_threads,
conversion_props.reuse_threads,
conversion_props.fold_recursive_prefix,
);

Expand Down
2 changes: 1 addition & 1 deletion samply/src/linux/profiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ fn make_converter(
framehop::CacheNative::new(),
None,
interpretation,
conversion_props.merge_threads,
conversion_props.reuse_threads,
conversion_props.fold_recursive_prefix,
)
}
Expand Down
4 changes: 2 additions & 2 deletions samply/src/linux_shared/converter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ where
cache: U::Cache,
extra_binary_artifact_dir: Option<&Path>,
interpretation: EventInterpretation,
merge_threads: bool,
reuse_threads: bool,
fold_recursive_prefix: bool,
) -> Self {
let interval = match interpretation.sampling_is_time_based {
Expand Down Expand Up @@ -138,7 +138,7 @@ where
Self {
profile,
cache,
processes: Processes::new(merge_threads),
processes: Processes::new(reuse_threads),
timestamp_converter,
current_sample_time: first_sample_time,
build_ids,
Expand Down
2 changes: 1 addition & 1 deletion samply/src/mac/sampler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl Sampler {
return Err(SamplingError::CouldNotObtainRootTask);
}
};
let mut process_recycler = if self.conversion_props.merge_threads {
let mut process_recycler = if self.conversion_props.reuse_threads {
Some(ProcessRecycler::new())
} else {
None
Expand Down
6 changes: 3 additions & 3 deletions samply/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ pub struct ConversionArgs {

/// Merge non-overlapping threads of the same name.
#[arg(long)]
merge_threads: bool,
reuse_threads: bool,

/// Fold repeated frames at the base of the stack.
#[arg(long)]
Expand Down Expand Up @@ -224,7 +224,7 @@ impl LoadArgs {
};
ConversionProps {
profile_name,
merge_threads: self.conversion_args.merge_threads,
reuse_threads: self.conversion_args.reuse_threads,
fold_recursive_prefix: self.conversion_args.fold_recursive_prefix,
}
}
Expand Down Expand Up @@ -261,7 +261,7 @@ impl RecordArgs {
};
ConversionProps {
profile_name,
merge_threads: self.conversion_args.merge_threads,
reuse_threads: self.conversion_args.reuse_threads,
fold_recursive_prefix: self.conversion_args.fold_recursive_prefix,
}
}
Expand Down
2 changes: 1 addition & 1 deletion samply/src/shared/jit_function_recycler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use fxprof_processed_profile::LibraryHandle;

use super::types::FastHashMap;

/// When running with --merge-threads, and we run a process multiple times, and each
/// When running with --reuse-threads, and we run a process multiple times, and each
/// of that invocations creates similar JIT functions, we want to collapse those "similar"
/// JIT functions into the same JIT function so that the assembly view shows more hits.
///
Expand Down
2 changes: 1 addition & 1 deletion samply/src/shared/recording_props.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub struct RecordingProps {
pub struct ConversionProps {
pub profile_name: String,
/// Merge non-overlapping threads of the same name.
pub merge_threads: bool,
pub reuse_threads: bool,
/// Fold repeated frames at the base of the stack.
pub fold_recursive_prefix: bool,
}

0 comments on commit 8dbad1c

Please sign in to comment.