Page MenuHomePhabricator

[gcov] Add __gcov_dump/__gcov_reset and delete __gcov_flush
ClosedPublic

Authored by MaskRay on Jul 3 2020, 5:01 PM.

Details

Summary

GCC r187297 (2012-05) introduced __gcov_dump and __gcov_reset.

`__gcov_flush = __gcov_dump + __gcov_reset`

https://gcc.gnu.org/PR93623 (target GCC 11.0) removed the unuseful and undocumented __gcov_flush.

Diff Detail

Event Timeline

MaskRay created this revision.Jul 3 2020, 5:01 PM
Herald added projects: Restricted Project, Restricted Project, Restricted Project. · View Herald TranscriptJul 3 2020, 5:01 PM
Herald added subscribers: llvm-commits, Restricted Project, cfe-commits, hiraditya. · View Herald Transcript

Some nit-picking, lgtm otherwise. Please wait for @calixte review though :-)

compiler-rt/test/profile/Inputs/instrprof-dlopen-dlclose-main.c
49–51

Do we also need to test gcov_flush symbol here too?

compiler-rt/test/profile/Inputs/instrprof-dlopen-dlclose-main.c.gcov
56 ↗(On Diff #275468)

Same question here, what about gcov_flush symbol?

compiler-rt/test/profile/Inputs/instrprof-dlopen-dlclose-main_three-libs.c.gcov
55 ↗(On Diff #275468)

And here.

MaskRay marked 6 inline comments as done.Jul 7 2020, 10:50 AM
MaskRay added inline comments.
compiler-rt/test/profile/Inputs/instrprof-dlopen-dlclose-main.c
49–51

__gcov_flush is deleted. We don't need to test it.

compiler-rt/test/profile/Inputs/instrprof-dlopen-dlclose-main.c.gcov
56 ↗(On Diff #275468)

__gcov_flush is deleted. We don't need to test it.

compiler-rt/test/profile/Inputs/instrprof-dlopen-dlclose-main_three-libs.c.gcov
55 ↗(On Diff #275468)

__gcov_flush is deleted. We don't need to test it.

compiler-rt/test/profile/Inputs/instrprof-dlopen-dlclose-main.c
49–51

Sorry, I meant __gcov_dump

compiler-rt/test/profile/Inputs/instrprof-dlopen-dlclose-main.c.gcov
56 ↗(On Diff #275468)

Sorry, I meant __gcov_dump

compiler-rt/test/profile/Inputs/instrprof-dlopen-dlclose-main_three-libs.c.gcov
55 ↗(On Diff #275468)

Sorry, I meant __gcov_dump

MaskRay updated this revision to Diff 276173.Jul 7 2020, 12:12 PM
MaskRay marked 6 inline comments as done.

Test __gcov_dump

compiler-rt/test/profile/Inputs/instrprof-dlopen-dlclose-main.c.gcov is clumsy to update. The filename is also wrong: gcov has nothing to do with instrprof.

I'll update the tests separately like my fba8523fb55c8e3bc853df7a250845cf51e5fc99

LGTM, I still would appreciate @calixte feedback here.

This revision is now accepted and ready to land.Jul 17 2020, 1:55 AM
MaskRay edited the summary of this revision. (Show Details)Jul 17 2020, 9:34 AM
calixte accepted this revision.Jul 17 2020, 9:35 AM

LGTM

This revision was automatically updated to reflect the committed changes.