-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When computing the product name, don't just pick the first item in th…
…e command array, because it might be an environment variable. This fixes what's displayed in the top left corner in the profiler UI when doing 'samply record MYENV=val my-command' .
- Loading branch information
Showing
4 changed files
with
79 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,28 @@ | ||
use std::{path::PathBuf, time::Duration}; | ||
use std::{ffi::OsString, path::PathBuf, time::Duration}; | ||
|
||
/// Properties which are meaningful both for recording a fresh process | ||
/// as well as for recording an existing process. | ||
pub struct RecordingProps { | ||
pub output_file: PathBuf, | ||
pub time_limit: Option<Duration>, | ||
pub interval: Duration, | ||
pub main_thread_only: bool, | ||
} | ||
|
||
/// Properties which are meaningful both for recording a profile and | ||
/// for converting a perf.data file to a profile. | ||
pub struct ProfileCreationProps { | ||
pub profile_name: String, | ||
/// Merge non-overlapping threads of the same name. | ||
pub reuse_threads: bool, | ||
/// Fold repeated frames at the base of the stack. | ||
pub fold_recursive_prefix: bool, | ||
} | ||
|
||
/// Properties which are meaningful for launching and recording a fresh process. | ||
pub struct ProcessLaunchProps { | ||
pub env_vars: Vec<(OsString, OsString)>, | ||
pub command_name: OsString, | ||
pub args: Vec<OsString>, | ||
pub iteration_count: u32, | ||
} |