llogiq / flame

An intrusive flamegraph profiling tool for rust.
Apache License 2.0
696 stars 30 forks source link

Add a macro to insert guarded events #3

Closed llogiq closed 8 years ago

llogiq commented 8 years ago

Feature request: This would be much more ergonomic if we had a procedural macro to insert guarded events on all function scopes, optionally also in loops or even on every scoped block. This could be an annotation macro like #[flame(loops)] and work on single functions or even whole modules (including submodules). Also perhaps allow a #[noflame] annotation to carve out un-instrumented code parts.

What do you think?

llogiq commented 8 years ago

I just took matters in my own hands: https://github.com/llogiq/flamer