[Bug gcov-profile/80223] RFE: Exclude functions from profile instrumentation

2021-09-07 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 Martin Liška changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug gcov-profile/80223] RFE: Exclude functions from profile instrumentation

2021-09-07 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 --- Comment #24 from CVS Commits --- The master branch has been updated by Martin Liska : https://gcc.gnu.org/g:aad72d2ea8378e1a56c00d15daa4bdcac8a5ae39 commit r12-3379-gaad72d2ea8378e1a56c00d15daa4bdcac8a5ae39 Author: Martin Liska Date:

[Bug gcov-profile/80223] RFE: Exclude functions from profile instrumentation

2021-06-24 Thread ndesaulniers at google dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 --- Comment #23 from Nick Desaulniers --- (In reply to Fangrui Song from comment #18) > I > think a similar topic may need to be raided on llvm-dev side as I feel this > is the tip of the iceberg - more attributes can be similarly leveraged. So,

[Bug gcov-profile/80223] RFE: Exclude functions from profile instrumentation

2021-06-24 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 --- Comment #22 from Martin Liška --- > For example, if an inlining pass happens after instrumentation, then the > function attribute doesn't necessarily need to suppress inlining. After > instrumentation is done, we can even treat the noprofile

[Bug gcov-profile/80223] RFE: Exclude functions from profile instrumentation

2021-06-23 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 --- Comment #21 from Fangrui Song --- (In reply to Fangrui Song from comment #20) > For example, if an inlining pass happens after instrumentation, then the > function attribute doesn't necessarily need to suppress inlining. After >

[Bug gcov-profile/80223] RFE: Exclude functions from profile instrumentation

2021-06-23 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 --- Comment #20 from Fangrui Song --- (In reply to Marco Elver from comment #19) I am ok with "inlining suppression" as an implementation strategy and I agree that it should be useful. What I objected strongly is "promised inlining

[Bug gcov-profile/80223] RFE: Exclude functions from profile instrumentation

2021-06-23 Thread elver at google dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 --- Comment #19 from Marco Elver --- (In reply to Fangrui Song from comment #18) [...] > Our problem is that a boolean attribute with 1 bit information cannot > express whether a neg attribute function can be inlined into a pos attribute >

[Bug gcov-profile/80223] RFE: Exclude functions from profile instrumentation

2021-06-23 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 --- Comment #18 from Fangrui Song --- (In reply to Nick Desaulniers from comment #15) > (In reply to Fangrui Song from comment #14) > > Can a no_profile_instrument_function function be inlined into a function > > without the attribute? This may

[Bug gcov-profile/80223] RFE: Exclude functions from profile instrumentation

2021-06-23 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 --- Comment #17 from Martin Liška --- All right, similarly to sanitizer flags, I sent a patch that prevent inlining when -fprofile-generate is used: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/573511.html Note that one typically uses

[Bug gcov-profile/80223] RFE: Exclude functions from profile instrumentation

2021-06-22 Thread ndesaulniers at google dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 --- Comment #16 from Nick Desaulniers --- Clang patch (no_profile -> no_profile_instrument_function): https://reviews.llvm.org/D104658 Kernel patches v2: https://lore.kernel.org/lkml/20210621231822.2848305-1-ndesaulni...@google.com/

[Bug gcov-profile/80223] RFE: Exclude functions from profile instrumentation

2021-06-21 Thread ndesaulniers at google dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 --- Comment #15 from Nick Desaulniers --- (In reply to Fangrui Song from comment #14) > Can a no_profile_instrument_function function be inlined into a function > without the attribute? This may be controversial but I'd argue that it can. > GCC

[Bug gcov-profile/80223] RFE: Exclude functions from profile instrumentation

2021-06-21 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 --- Comment #14 from Fangrui Song --- (In reply to Martin Liška from comment #13) > What's likely missing is that the attribute should prevent inlining. I'm > going to test how it behaves right now. Then, the issue can be closed. It's not clear

[Bug gcov-profile/80223] RFE: Exclude functions from profile instrumentation

2021-06-21 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 Martin Liška changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned

[Bug gcov-profile/80223] RFE: Exclude functions from profile instrumentation

2021-06-21 Thread ndesaulniers at google dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 --- Comment #12 from Nick Desaulniers --- Ah, perfect! commit 1225d6b1134b ("Introduce no_profile_instrument_function attribute") LGTM: https://godbolt.org/z/779xzndY6 Looks like it landed in GCC 7.1. Let me change over the attribute

[Bug gcov-profile/80223] RFE: Exclude functions from profile instrumentation

2021-06-21 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 --- Comment #11 from Martin Liška --- Apparently, we already have an attribute that prevents function instrumentation regarding PGO: no_profile_instrument_function The no_profile_instrument_function attribute on functions is used to inform the

[Bug gcov-profile/80223] RFE: Exclude functions from profile instrumentation

2021-06-18 Thread ndesaulniers at google dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 --- Comment #10 from Nick Desaulniers --- Link to kernel patches: https://lore.kernel.org/lkml/20210618233023.1360185-1-ndesaulni...@google.com/

[Bug gcov-profile/80223] RFE: Exclude functions from profile instrumentation

2021-06-17 Thread ndesaulniers at google dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 --- Comment #9 from Nick Desaulniers --- (In reply to Fangrui Song from comment #8) > I am thinking of __attribute__((no_profile)). > > In Clang, > -fprofile-generate(-fcs-profile-generate)/-fprofile-instr-generate/-fprofile- > arcs are all

[Bug gcov-profile/80223] RFE: Exclude functions from profile instrumentation

2021-06-15 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 --- Comment #8 from Fangrui Song --- I am thinking of __attribute__((no_profile)). In Clang, -fprofile-generate(-fcs-profile-generate)/-fprofile-instr-generate/-fprofile-arcs are all different. It will make sense to have a attribute disabling

[Bug gcov-profile/80223] RFE: Exclude functions from profile instrumentation

2021-06-14 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 Fangrui Song changed: What|Removed |Added CC||i at maskray dot me --- Comment #7 from

[Bug gcov-profile/80223] RFE: Exclude functions from profile instrumentation

2021-06-14 Thread ndesaulniers at google dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 Nick Desaulniers changed: What|Removed |Added CC||elver at google dot com,

[Bug gcov-profile/80223] RFE: Exclude functions from profile instrumentation

2017-04-13 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 Jan Hubicka changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug gcov-profile/80223] RFE: Exclude functions from profile instrumentation

2017-03-28 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 --- Comment #4 from Martin Liška --- I see. Simplest solution is to propagate the attribute to callers, or don't allow inlining between a pair of function one w/ and second w/o the attribute? Richi?

[Bug gcov-profile/80223] RFE: Exclude functions from profile instrumentation

2017-03-28 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 --- Comment #3 from Marek Polacek --- E.g. if you have an application that is usually just busy waiting, waiting for something to happen, but you're not interested in profiling that function, or some function runs in a context where it is not

[Bug gcov-profile/80223] RFE: Exclude functions from profile instrumentation

2017-03-28 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 --- Comment #2 from Martin Liška --- May I ask you Marek what would be use-case of such attribute? Thanks

[Bug gcov-profile/80223] RFE: Exclude functions from profile instrumentation

2017-03-27 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 --- Comment #1 from Richard Biener --- Not so easy though as profiling happens after inlining.

[Bug gcov-profile/80223] RFE: Exclude functions from profile instrumentation

2017-03-27 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 Richard Biener changed: What|Removed |Added Severity|normal |enhancement