|
19 | 19 | //! performance counter support ([#143](https://github.com/rust-lang/measureme/pull/143)).*
|
20 | 20 | //!
|
21 | 21 | //! The hardware performance counters (i.e. all counters other than `wall-time`) are limited to:
|
22 |
| -//! * nightly Rust (gated on `features = ["nightly"]`), for `asm!` |
23 | 22 | //! * Linux, for out-of-the-box performance counter reads from userspace
|
24 | 23 | //! * other OSes could work through custom kernel extensions/drivers, in the future
|
25 | 24 | //! * `x86_64` CPUs, mostly due to lack of other available test hardware
|
@@ -300,10 +299,11 @@ const BUG_REPORT_MSG: &str =
|
300 | 299 | "please report this to https://github.com/rust-lang/measureme/issues/new";
|
301 | 300 |
|
302 | 301 | /// Linux x86_64 implementation based on `perf_event_open` and `rdpmc`.
|
303 |
| -#[cfg(all(feature = "nightly", target_arch = "x86_64", target_os = "linux"))] |
| 302 | +#[cfg(all(target_arch = "x86_64", target_os = "linux"))] |
304 | 303 | mod hw {
|
305 | 304 | use memmap2::{Mmap, MmapOptions};
|
306 | 305 | use perf_event_open_sys::{bindings::*, perf_event_open};
|
| 306 | + use std::arch::asm; |
307 | 307 | use std::convert::TryInto;
|
308 | 308 | use std::error::Error;
|
309 | 309 | use std::fs;
|
@@ -934,7 +934,7 @@ mod hw {
|
934 | 934 | }
|
935 | 935 | }
|
936 | 936 |
|
937 |
| -#[cfg(not(all(feature = "nightly", target_arch = "x86_64", target_os = "linux")))] |
| 937 | +#[cfg(not(all(target_arch = "x86_64", target_os = "linux")))] |
938 | 938 | mod hw {
|
939 | 939 | use std::error::Error;
|
940 | 940 |
|
@@ -985,10 +985,6 @@ mod hw {
|
985 | 985 | msg += s;
|
986 | 986 | };
|
987 | 987 |
|
988 |
| - if cfg!(not(feature = "nightly")) { |
989 |
| - add_error("only supported with measureme's \"nightly\" feature"); |
990 |
| - } |
991 |
| - |
992 | 988 | if cfg!(not(target_arch = "x86_64")) {
|
993 | 989 | add_error("only supported architecture is x86_64");
|
994 | 990 | }
|
|
0 commit comments