Skip to content

Commit

Permalink
fix cig
Browse files Browse the repository at this point in the history
  • Loading branch information
piotmag769 committed Jun 10, 2024
1 parent b17560f commit 7f368ee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/cairo-profiler/src/profile_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ impl ProfilerContext {
let mut current_function_stack_start_index = 0;
for (index, function) in call_stack.iter().enumerate() {
match function {
Function::InternalFunction(InternalFunction::Inlined(_))
Function::InternalFunction(InternalFunction::NonInlined(_))
| Function::Entrypoint(_) => {
if index != 0 {
function_stacks_indexes
.push((current_function_stack_start_index, index - 1));
}
current_function_stack_start_index = index;
}
Function::InternalFunction(InternalFunction::NonInlined(_)) => {}
Function::InternalFunction(InternalFunction::Inlined(_)) => {}
}
}
function_stacks_indexes.push((current_function_stack_start_index, call_stack.len() - 1));
Expand All @@ -108,7 +108,7 @@ impl ProfilerContext {
is_folded: true,
}
}
Function::InternalFunction(InternalFunction::Inlined(_)) => unreachable!("First function in a function stack corresponding to a single location cannot be inlined")
Function::InternalFunction(InternalFunction::Inlined(_)) => unreachable!("First function in a call stack corresponding to a single location cannot be inlined")
};

for function in function_stack.get(1..).unwrap_or_default() {
Expand All @@ -122,7 +122,7 @@ impl ProfilerContext {
}
Function::Entrypoint(_)
| Function::InternalFunction(InternalFunction::NonInlined(_)) => {
unreachable!("Only first function in a function stack corresponding to a single location can be not inlined")
unreachable!("Only first function in a call stack corresponding to a single location can be not inlined")
}
}
}
Expand Down

0 comments on commit 7f368ee

Please sign in to comment.