Skip to content

Commit 2b93a9b

Browse files
committed
framework_lib: Add some tracing
Signed-off-by: Daniel Schaefer <[email protected]>
1 parent 3243cb7 commit 2b93a9b

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

framework_lib/src/smbios.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ pub struct Smbios {
126126

127127
#[cfg(target_os = "freebsd")]
128128
pub fn get_smbios() -> Option<SMBiosData> {
129+
trace!("get_smbios() FreeBSD entry");
129130
// Get the SMBIOS entrypoint address from the kernel environment
130131
let addr_hex = kenv_get("hint.smbios.0.mem").ok()?;
131132
let addr_hex = addr_hex.trim_start_matches("0x");
@@ -189,6 +190,7 @@ pub fn get_smbios() -> Option<SMBiosData> {
189190

190191
#[cfg(feature = "uefi")]
191192
pub fn get_smbios() -> Option<SMBiosData> {
193+
trace!("get_smbios() uefi entry");
192194
let data = crate::uefi::smbios_data().unwrap();
193195
let version = None; // TODO: Maybe add the version here
194196
let smbios = SMBiosData::from_vec_and_version(data, version);
@@ -198,6 +200,7 @@ pub fn get_smbios() -> Option<SMBiosData> {
198200
// On Windows from the kernel API
199201
#[cfg(all(not(feature = "uefi"), not(target_os = "freebsd")))]
200202
pub fn get_smbios() -> Option<SMBiosData> {
203+
trace!("get_smbios() linux entry");
201204
match smbioslib::table_load_from_device() {
202205
Ok(data) => Some(data),
203206
Err(ref e) if e.kind() == ErrorKind::PermissionDenied => {

framework_lib/src/util.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ impl Config {
6464
}
6565

6666
pub fn get() -> MutexGuard<'static, Option<Self>> {
67+
trace!("Config::get() entry");
6768
let unset = {
6869
#[cfg(feature = "std")]
6970
let config = CONFIG.lock().unwrap();
@@ -88,6 +89,7 @@ impl Config {
8889
let mut config = CONFIG.lock();
8990

9091
if new_config.is_some() {
92+
trace!("Config::get() initializing");
9193
*config = new_config;
9294
}
9395

0 commit comments

Comments
 (0)