Skip to content

perf macro#95

Open
vladimir-ea wants to merge 1 commit into
mainfrom
ve/perf_counters
Open

perf macro#95
vladimir-ea wants to merge 1 commit into
mainfrom
ve/perf_counters

Conversation

@vladimir-ea

Copy link
Copy Markdown
Collaborator

adds a #[perf] macro that can be used like the #[timed] one. This one is gated behind a feature flag perf.

use it like:

    #[timed]
    #[perf]
    pub fn decompress() { 

or:

    #[timed]
    #[perf(sample = 100)]
    pub fn decompress() { 

to record every 100 times the function is called.

outputs: instruction count, cpu cycles, instructions per cycle (ipc), branch misses, cpu cache misses on surfer 'perf' tab:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants