-
-
Notifications
You must be signed in to change notification settings - Fork 316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introspection #58
Merged
Merged
Introspection #58
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
12b9584
Rework to put `ClientPerfStats` in `State` and pass that along. Still…
ctfhacker c017d72
Add perf_stats feature to libafl/Cargo.toml
ctfhacker 23061ef
Update feedbacks to have with_perf
ctfhacker 9469776
Merge branch 'real_time_benchmarks' of github.com:AFLplusplus/LibAFL …
ctfhacker 542738c
Merge branch 'dev' into real_time_benchmarks
ctfhacker fedb5f8
Remove unneeeded print statement
ctfhacker 7423cef
cargo fmt all the things
ctfhacker 4ad9c10
use local llvmint vs cpu specific asm for reading cycle counter
ctfhacker b9a0c7c
Remove debug testing code
ctfhacker 2a96fe3
Stats timeout to 3 seconds
ctfhacker 55703cb
Inline smallish functions for ClientPerfStats
ctfhacker 042bfce
Remove .libs/llvmint and have the correct conditional compilation of …
ctfhacker 2b6b369
pub(crate) the NUM_FEEDBACK and NUM_STAGES consts
ctfhacker 8219da3
Merge branch 'dev' into real_time_benchmarks
domenukk 33df973
perf_stats->instrospection; merged dev; moved back to x86 stable
domenukk b9e75c0
Tcp Broker to Broker Communication (#66)
domenukk 3fb4626
merged dev
domenukk 0ac407a
adapted to new feedback interface;;
domenukk 6cc1e96
clippy fixes
domenukk 1fa893e
fallback to systemtime on non-x86
domenukk 5d1eb27
make clippy more strict
domenukk f56f340
small fixes
andreafioraldi 1e61748
bump 0.2.1
andreafioraldi 92116b9
readme
andreafioraldi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,10 +1,15 @@ | ||
//! Architecture agnostic processor features | ||
|
||
extern { | ||
#[link_name = "llvm.readcyclecounter"] | ||
pub fn readcyclecounter() -> u64; | ||
} | ||
|
||
/// Read time counter using [`llvmint::readcyclecounter`] | ||
/// | ||
/// This function is a wrapper around [`llvmint`] to make it easier to test various | ||
/// implementations of reading a cycle counter. In this way, an experiment only has to | ||
/// change this implementation rather than every instead of [`cpu::read_time_counter`] | ||
pub fn read_time_counter() -> u64 { | ||
unsafe { llvmint::readcyclecounter() } | ||
unsafe { readcyclecounter() } | ||
} |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ins't this feature perma-unstable? Might be worth depending on
llvmint
instead of requiring nightly.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so too. Seems like the stable and hardware-independent way to go for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I plan to use it in
libafl_frida
anyways, if that helps.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oof...
llvmint
depends onsimdty
which uses nightly features...Not good.
We can either do our own C wrapper or go back to the initial proposal to do it using
libc
...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok so we do want to enforce
std
features. I can convert everything to just usingInstant
rather than the pureu64
. It won't work forno_std
obviously. I guess I forgot not everyone doesn't run onnightly
all the time ;-)I guess asking to run in
nightly
forperf_stats
might be a big ask as well?Yeah
llvmint
relying onsimdty
was the reason I ripped out just the extern in the first place.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the C wrapper is the way to go...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C wrappers are the way to go but be careful, Rust code is compiled with LLVM but the C code may be compiled with GCC or MSVC, depends on the build.rs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I discovered the hard way that
__builtin_thread_pointer
is not universally accepted.