[Bug gcov-profile/110827] C++20 coroutines aren't being measured by gcov

2025-03-24 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110827 --- Comment #20 from Iain Sandoe --- (In reply to Michael Duggan from comment #19) > I submitted a patch. Yes a saw that - thanks, it does need other people to review it though, > I also recently thought of another potential solution. > We co

[Bug gcov-profile/110827] C++20 coroutines aren't being measured by gcov

2025-03-24 Thread mwd at md5i dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110827 --- Comment #19 from Michael Duggan --- I submitted a patch. I also recently thought of another potential solution. We could patch the code that outputs the function information for the graph file, changing it to *not* mark the actor function

[Bug gcov-profile/110827] C++20 coroutines aren't being measured by gcov

2025-03-21 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110827 --- Comment #18 from Iain Sandoe --- (In reply to Michael Duggan from comment #17) > Gcov doesn't have access to the function declaration, only to the > information that has been output to the count and graph files. Neither of > those contain a

[Bug gcov-profile/110827] C++20 coroutines aren't being measured by gcov

2025-03-21 Thread mwd at md5i dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110827 --- Comment #17 from Michael Duggan --- Gcov doesn't have access to the function declaration, only to the information that has been output to the count and graph files. Neither of those contain any information (as far as I can tell) that would

[Bug gcov-profile/110827] C++20 coroutines aren't being measured by gcov

2025-03-21 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110827 --- Comment #16 from Iain Sandoe --- (In reply to Michael Duggan from comment #15) > Would it be possible for one of these to make it into version 15? I'd prefer the change that teaches gcov about coroutines, I fear the change to the status of

[Bug gcov-profile/110827] C++20 coroutines aren't being measured by gcov

2025-03-21 Thread mwd at md5i dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110827 --- Comment #15 from Michael Duggan --- Would it be possible for one of these to make it into version 15?

[Bug gcov-profile/110827] C++20 coroutines aren't being measured by gcov

2025-03-12 Thread mwd at md5i dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110827 --- Comment #14 from Michael Duggan --- So, I applied the following patch instead, with identical results. Pro: doesn't change the artificiality status of the function. Con: more complex code. 1 file changed, 34 insertions(+), 2 deletions(-)

[Bug gcov-profile/110827] C++20 coroutines aren't being measured by gcov

2025-03-10 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110827 --- Comment #13 from Iain Sandoe --- I would say that perhaps (noting comment #9) it would be useful to explore teaching gcov that it should not ignore the actor function (it is identifiable that a function is a coroutine component) Part of the

[Bug gcov-profile/110827] C++20 coroutines aren't being measured by gcov

2025-03-10 Thread mwd at md5i dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110827 --- Comment #12 from Michael Duggan --- I finally got around to this experiment today, after more than a year. I changed this line in `coro_build_actor_or_destory_function` from: DECL_ARTIFICIAL (fn) = true; to DECL_ARTIFICIAL (fn) = !act

[Bug gcov-profile/110827] C++20 coroutines aren't being measured by gcov

2023-09-26 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110827 --- Comment #11 from Iain Sandoe --- (In reply to Michael Duggan from comment #9) > More data: > The coroutine actor is marked as artificial in > coro_build_actor_or_destroy_function. As a result, it is completely ignored > by gcov. In gcov's

[Bug gcov-profile/110827] C++20 coroutines aren't being measured by gcov

2023-09-25 Thread mwd at md5i dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110827 --- Comment #10 from Michael Duggan --- To sum up what I have figured out, C++ transforms the coroutine "function" into a trio of functions: a ramp function, an actor function, and a destruction function. The ramp function acts as the actual fu

[Bug gcov-profile/110827] C++20 coroutines aren't being measured by gcov

2023-08-31 Thread mwd at md5i dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110827 --- Comment #9 from Michael Duggan --- More data: The coroutine actor is marked as artificial in coro_build_actor_or_destroy_function. As a result, it is completely ignored by gcov. In gcov's process_all_functions function, artificial function

[Bug gcov-profile/110827] C++20 coroutines aren't being measured by gcov

2023-08-29 Thread mwd at md5i dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110827 --- Comment #8 from Michael Duggan --- Using the better test case, I have determined that the coroutine _is_ being instrumented with gcov counters. When disassembled, the output contains the following in the bar() actor function: Dump of assem

[Bug gcov-profile/110827] C++20 coroutines aren't being measured by gcov

2023-08-29 Thread mwd at md5i dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110827 Michael Duggan changed: What|Removed |Added Attachment #55648|0 |1 is obsolete|

[Bug gcov-profile/110827] C++20 coroutines aren't being measured by gcov

2023-07-28 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110827 --- Comment #6 from Iain Sandoe --- (In reply to Richard Biener from comment #5) > (In reply to Iain Sandoe from comment #2) > > (In reply to Richard Biener from comment #1) > > > I'm seeing all code properly instrumented. The coverage I see is

[Bug gcov-profile/110827] C++20 coroutines aren't being measured by gcov

2023-07-27 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110827 --- Comment #5 from Richard Biener --- (In reply to Iain Sandoe from comment #2) > (In reply to Richard Biener from comment #1) > > I'm seeing all code properly instrumented. The coverage I see is > > > 1: 27:task foo() { > >

[Bug gcov-profile/110827] C++20 coroutines aren't being measured by gcov

2023-07-27 Thread mwd at md5i dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110827 --- Comment #4 from Michael Duggan --- I should be more explicit. The `std::cout` line in the example is just a placeholder for "does some work here," and this example is specifically the simplest version of a coroutine I could come up with tha

[Bug gcov-profile/110827] C++20 coroutines aren't being measured by gcov

2023-07-27 Thread mwd at md5i dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110827 --- Comment #3 from Michael Duggan --- (In reply to Richard Biener from comment #1) > I'm seeing all code properly instrumented. The coverage I see is > > -:1:#include > -:2:#include > -:3: > -:

[Bug gcov-profile/110827] C++20 coroutines aren't being measured by gcov

2023-07-27 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110827 --- Comment #2 from Iain Sandoe --- (In reply to Richard Biener from comment #1) > I'm seeing all code properly instrumented. The coverage I see is > 1: 27:task foo() { > -: 28: std::cout << "Running..." << std::endl; >

[Bug gcov-profile/110827] C++20 coroutines aren't being measured by gcov

2023-07-27 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110827 Richard Biener changed: What|Removed |Added Last reconfirmed||2023-07-27 Status|UNCONFIR