Skip to content

Commit

Permalink
Stop using c_api symbols in benchmarks
Browse files Browse the repository at this point in the history
Stop using symbols from the c_api module in our normalization and
symbolization benchmarks. Replace them with symbols from the "regular"
Rust API surface.

Signed-off-by: Daniel Müller <[email protected]>
  • Loading branch information
d-e-s-o authored and danielocfb committed Nov 21, 2023
1 parent ac674ed commit 29ffbc3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions benches/normalize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

use std::hint::black_box;

use blazesym::c_api;
use blazesym::normalize::Normalizer;
use blazesym::Addr;

Expand All @@ -17,7 +16,7 @@ fn normalize_process() {
libc::dlopen as Addr,
libc::fopen as Addr,
normalize_process as Addr,
c_api::blaze_inspector_free as Addr,
Normalizer::normalize_user_addrs_sorted as Addr,
];
let () = addrs.sort();

Expand Down
3 changes: 1 addition & 2 deletions benches/symbolize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
use std::hint::black_box;
use std::path::Path;

use blazesym::c_api;
use blazesym::symbolize::Elf;
use blazesym::symbolize::GsymFile;
use blazesym::symbolize::Input;
Expand All @@ -26,7 +25,7 @@ fn symbolize_process() {
libc::dlopen as Addr,
libc::fopen as Addr,
symbolize_process as Addr,
c_api::blaze_inspector_free as Addr,
Symbolizer::symbolize_single as Addr,
];

let symbolizer = Symbolizer::new();
Expand Down

0 comments on commit 29ffbc3

Please sign in to comment.