Skip to content

Commit f56f340

Browse files
small fixes
1 parent 5d1eb27 commit f56f340

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

libafl/src/state/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ where
697697
let is_interesting = {
698698
// Init temporary feedback stats here. We can't use the typical pattern above
699699
// since we need a `mut self` for `feedbacks_mut`, so we can't also hand a
700-
// new `mut self` to `is_interesting_all_with_perf`. We use this stack
700+
// new `mut self` to `is_interesting_with_perf`. We use this stack
701701
// variable to get the stats and then update the feedbacks directly
702702
let mut feedback_stats = [0_u64; crate::stats::NUM_FEEDBACKS];
703703
let feedback_index = 0;

libafl/src/stats/mod.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,10 @@ macro_rules! mark_feedback_time {
266266
}
267267

268268
/// Number of stages in the fuzzer
269-
pub(crate) const NUM_STAGES: usize = 4;
269+
pub(crate) const NUM_STAGES: usize = 8;
270270

271271
/// Number of feedback mechanisms to measure for performance
272-
pub(crate) const NUM_FEEDBACKS: usize = 4;
272+
pub(crate) const NUM_FEEDBACKS: usize = 16;
273273

274274
/// Client performance statistics
275275
#[derive(Serialize, Deserialize, Debug, Copy, Clone)]
@@ -296,6 +296,7 @@ pub struct ClientPerfStats {
296296
/// stages if they are not in use.
297297
stages_used: [bool; NUM_STAGES],
298298

299+
// TODO(andrea) use an hashmap and indetify feaures using a &'static str
299300
/// Clock cycles spent in the the various features of each stage
300301
stages: [[u64; PerfFeature::Count as usize]; NUM_STAGES],
301302

@@ -334,10 +335,10 @@ pub enum PerfFeature {
334335
/// Time spent in the [`post_exec_observers`](crate::executors::Executor::post_exec_observers) callback
335336
PostExecObservers = 7,
336337

337-
/// Time spent getting the feedback from [`is_interesting_all`] from all feedbacks
338+
/// Time spent getting the feedback from [`is_interesting`] from all feedbacks
338339
GetFeedbackInterestingAll = 8,
339340

340-
/// Time spent getting the feedback from [`is_interesting_all`] from all observers
341+
/// Time spent getting the feedback from [`is_interesting`] from all objectives
341342
GetObjectivesInterestingAll = 9,
342343

343344
/// Used as a counter to know how many elements are in [`PerfFeature`]. Must be the

0 commit comments

Comments
 (0)