[PATCH] D83149: [gcov] Add __gcov_dump/__gcov_reset and delete __gcov_flush

2020-07-17 Thread calixte via Phabricator via cfe-commits
calixte accepted this revision. calixte added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83149/new/ https://reviews.llvm.org/D83149 ___ cfe-commits mailing list cfe-commits@lists.llv

[PATCH] D78477: [profile] Don't crash when forking in several threads

2020-04-24 Thread calixte via Phabricator via cfe-commits
calixte updated this revision to Diff 259854. calixte added a comment. Fix nits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78477/new/ https://reviews.llvm.org/D78477 Files: clang/lib/Driver/ToolChains/Darwin.cpp compiler-rt/lib/profile/GCD

[PATCH] D78477: [profile] Don't crash when forking in several threads

2020-04-20 Thread calixte via Phabricator via cfe-commits
calixte updated this revision to Diff 258686. calixte added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Export symbol for Darwin target Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78477/new/ https://reviews.l

[PATCH] D74953: [profile] Don't dump counters when forking and don't reset when calling exec** functions

2020-02-21 Thread calixte via Phabricator via cfe-commits
calixte updated this revision to Diff 245848. calixte added a comment. Fix a typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74953/new/ https://reviews.llvm.org/D74953 Files: clang/lib/Driver/ToolChains/Darwin.cpp compiler-rt/lib/profile/GC

[PATCH] D74953: [profile] Don't dump counters when forking and don't reset when calling exec** functions

2020-02-21 Thread calixte via Phabricator via cfe-commits
calixte marked an inline comment as done. calixte added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp:635 void GCOVProfiler::AddFlushBeforeForkAndExec() { - SmallVector ForkAndExecs; + SmallVector, 2> ForkAndExecs; for (auto &F : M->func

[PATCH] D74953: [profile] Don't dump counters when forking and don't reset when calling exec** functions

2020-02-21 Thread calixte via Phabricator via cfe-commits
calixte added inline comments. Comment at: compiler-rt/lib/profile/GCDAProfiling.c:671 +pid_t child_pid = getpid(); +if (child_pid != parent_pid) { + // The pid changed so we've a fork marco-c wrote: > Nit: do we need this check or can we just use th

[PATCH] D74953: [profile] Don't dump counters when forking and don't reset when calling exec** functions

2020-02-21 Thread calixte via Phabricator via cfe-commits
calixte updated this revision to Diff 245843. calixte marked 4 inline comments as done. calixte added a comment. Add more comments to explain why we need to lock around the fork Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74953/new/ https://revie

[PATCH] D74953: [profile] Don't dump counters when forking and don't reset when calling exec** functions

2020-02-21 Thread calixte via Phabricator via cfe-commits
calixte updated this revision to Diff 245837. calixte added a comment. If exec** fails we need to reset the counters since they've have dumped just before to avoid to count them twice. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74953/new/ https

[PATCH] D74953: [profile] Don't dump counters when forking and don't reset when calling exec** functions

2020-02-21 Thread calixte via Phabricator via cfe-commits
calixte created this revision. calixte added a reviewer: marco-c. Herald added subscribers: llvm-commits, Sanitizers, cfe-commits, hiraditya. Herald added projects: clang, Sanitizers, LLVM. There is no need to write out gcdas when forking because we can just reset the counters in the parent proce

[PATCH] D74071: [Profile] Avoid deadlock in multithreaded context when forking with coverage enabled

2020-02-05 Thread calixte via Phabricator via cfe-commits
calixte created this revision. calixte added a reviewer: marco-c. Herald added subscribers: llvm-commits, Sanitizers, cfe-commits, jfb, hiraditya. Herald added projects: clang, Sanitizers, LLVM. When a program is forked with code coverage enabled, all the counters are flushed. To avoid data race,

[PATCH] D54600: [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to filter the files to instrument with gcov (after revert https://reviews.llvm.org/rL346659)

2018-11-17 Thread calixte via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC347144: [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to… (authored by calixte, committed by ). Changed prior to commit: https://reviews.llvm.org/D54600?vs=174281&id=174512#toc

[PATCH] D54600: [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to filter the files to instrument with gcov (after revert https://reviews.llvm.org/rL346659)

2018-11-15 Thread calixte via Phabricator via cfe-commits
calixte created this revision. calixte added a reviewer: marco-c. Herald added a subscriber: cfe-commits. the previous patch (https://reviews.llvm.org/rC346642) has been reverted because of test failure under windows. So this patch fix the test cfe/trunk/test/CodeGen/code-coverage-filter.c. Rep

[PATCH] D54416: [GCOV] fix test after patch rL346642

2018-11-12 Thread calixte via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL346644: [GCOV] fix test after patch rL346642 (authored by calixte, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D54416 Files: cfe/trunk/test/

[PATCH] D54416: [GCOV] fix test after patch rL346642

2018-11-12 Thread calixte via Phabricator via cfe-commits
calixte created this revision. calixte added a reviewer: marco-c. Herald added a subscriber: cfe-commits. Test is failing under windows, so fix it Repository: rC Clang https://reviews.llvm.org/D54416 Files: test/CodeGen/code-coverage-filter.c Index: test/CodeGen/code-coverage-filter.c ==

[PATCH] D52034: [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to filter the files to instrument with gcov

2018-11-12 Thread calixte via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC346642: [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to… (authored by calixte, committed by ). Changed prior to commit: https://reviews.llvm.org/D52034?vs=173623&id=173627#toc

[PATCH] D52034: [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to filter the files to instrument with gcov

2018-11-12 Thread calixte via Phabricator via cfe-commits
calixte updated this revision to Diff 173623. calixte added a comment. Forgot the ellipsis in the release notes. Repository: rC Clang https://reviews.llvm.org/D52034 Files: docs/ReleaseNotes.rst docs/UsersManual.rst include/clang/Driver/Options.td include/clang/Frontend/CodeGenOption

[PATCH] D52034: [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to filter the files to instrument with gcov

2018-11-12 Thread calixte via Phabricator via cfe-commits
calixte updated this revision to Diff 173622. calixte added a comment. Update ReleaseNotes Repository: rC Clang https://reviews.llvm.org/D52034 Files: docs/ReleaseNotes.rst docs/UsersManual.rst include/clang/Driver/Options.td include/clang/Frontend/CodeGenOptions.h lib/CodeGen/Back

[PATCH] D52034: [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to filter the files to instrument with gcov

2018-11-07 Thread calixte via Phabricator via cfe-commits
calixte updated this revision to Diff 172905. calixte added a comment. Update doc. Repository: rC Clang https://reviews.llvm.org/D52034 Files: docs/UsersManual.rst include/clang/Driver/Options.td include/clang/Frontend/CodeGenOptions.h lib/CodeGen/BackendUtil.cpp lib/Driver/ToolCha

[PATCH] D52034: [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to filter the files to instrument with gcov

2018-11-06 Thread calixte via Phabricator via cfe-commits
calixte updated this revision to Diff 172761. calixte added a comment. Fix plural form of regex and just use ';' as separator. Repository: rC Clang https://reviews.llvm.org/D52034 Files: docs/UsersManual.rst include/clang/Driver/Options.td include/clang/Frontend/CodeGenOptions.h lib/

[PATCH] D52034: [Clang] Add options -Xclang -coverage-filter and -Xclang -coverage-exclude to filter the files to instrument with gcov

2018-11-06 Thread calixte via Phabricator via cfe-commits
calixte updated this revision to Diff 172752. calixte added a comment. Change options names to -fprofile-exclude-files & -fprofile-filter-files and add some doc in UserManual. Repository: rC Clang https://reviews.llvm.org/D52034 Files: docs/UsersManual.rst include/clang/Driver/Options.t

[PATCH] D53578: [CodeGen] Fix clang test for gcov profiling (follow-up of D51974)

2018-10-23 Thread calixte via Phabricator via cfe-commits
calixte created this revision. calixte added a reviewer: vsk. Herald added a subscriber: cfe-commits. After patch https://reviews.llvm.org/D51974 has landed, this one is required to fix a test. Repository: rC Clang https://reviews.llvm.org/D53578 Files: test/CodeGen/code-coverage.c Inde

[PATCH] D52034: [Clang] Add options -Xclang -coverage-filter and -Xclang -coverage-exclude to filter the files to instrument with gcov

2018-10-18 Thread calixte via Phabricator via cfe-commits
calixte added a comment. @vsk, gcc guys are ok for -fprofile-filter-files and -fprofile-exclude-files, are you ok with that ? Should these options prefixed by -Xclang or not ? Repository: rC Clang https://reviews.llvm.org/D52034 ___ cfe-commits

[PATCH] D52034: [Clang] Add options -Xclang -coverage-filter and -Xclang -coverage-exclude to filter the files to instrument with gcov

2018-09-26 Thread calixte via Phabricator via cfe-commits
calixte added a comment. I reported a bug for gcc: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87442 @vsk I'd like to add documentation in Docs/UsersManual.rst, but I've no idea on what's a good place for this (I look for option -coverage-no-function-names-in-data, but I didn't get anything). S

[PATCH] D52034: [Clang] Add options -Xclang -coverage-filter and -Xclang -coverage-exclude to filter the files to instrument with gcov

2018-09-26 Thread calixte via Phabricator via cfe-commits
calixte updated this revision to Diff 167101. calixte added a comment. Fix tests Repository: rC Clang https://reviews.llvm.org/D52034 Files: include/clang/Driver/CC1Options.td include/clang/Frontend/CodeGenOptions.h lib/CodeGen/BackendUtil.cpp lib/Frontend/CompilerInvocation.cpp te

[PATCH] D49916: [CodeGen] Add to emitted DebugLoc information about coverage when it's required

2018-09-21 Thread calixte via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC342717: [CodeGen] Add to emitted DebugLoc information about coverage when it's required (authored by calixte, committed by ). Changed prior to commit: https://reviews.llvm.org/D49916?vs=164860&id=166416

[PATCH] D52034: [Clang] Add options -Xclang -coverage-filter and -Xclang -coverage-exclude to filter the files to instrument with gcov

2018-09-13 Thread calixte via Phabricator via cfe-commits
calixte added inline comments. Comment at: include/clang/Driver/CC1Options.td:236 +def coverage_exclude_EQ : Joined<["-"], "coverage-exclude=">, + Alias; def coverage_exit_block_before_body : Flag<["-"], "coverage-exit-block-before-body">, vsk wrote: > Have yo

[PATCH] D52034: [Clang] Add options -Xclang -coverage-filter and -Xclang -coverage-exclude to filter the files to instrument with gcov

2018-09-13 Thread calixte via Phabricator via cfe-commits
calixte created this revision. calixte added reviewers: marco-c, vsk. Herald added a subscriber: cfe-commits. These options are taking regex separated by colons to filter files. - if both are empty then all files are instrumented - if -coverage-filter is empty then all the filenames matching any

[PATCH] D51945: [Clang] Fix test to followup https://reviews.llvm.org/rL341977

2018-09-11 Thread calixte via Phabricator via cfe-commits
calixte added a comment. My bad, I missed that Repository: rC Clang https://reviews.llvm.org/D51945 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D51945: [Clang] Fix test to followup https://reviews.llvm.org/rL341977

2018-09-11 Thread calixte via Phabricator via cfe-commits
calixte created this revision. calixte added a reviewer: vsk. Herald added a subscriber: cfe-commits. In the previous patch, __llvm_gcov_indirect_counter_increment has been removed. Repository: rC Clang https://reviews.llvm.org/D51945 Files: test/CodeGen/code-coverage.c Index: test/CodeG

[PATCH] D49916: [CodeGen] Add to emitted DebugLoc information about coverage when it's required

2018-09-11 Thread calixte via Phabricator via cfe-commits
calixte updated this revision to Diff 164860. calixte added a comment. - only put an ImplicitCode for EmitLandingPad - fix tests (were broken with clanf-format-diff) Repository: rC Clang https://reviews.llvm.org/D49916 Files: lib/CodeGen/CGDebugInfo.cpp lib/CodeGen/CGDebugInfo.h lib/Co

[PATCH] D49916: [CodeGen] Add to emitted DebugLoc information about coverage when it's required

2018-09-11 Thread calixte via Phabricator via cfe-commits
calixte updated this revision to Diff 164851. calixte added a comment. - Add some ImplicitCode when there is some stuff at the end of a function - Fix the tests Repository: rC Clang https://reviews.llvm.org/D49916 Files: lib/CodeGen/CGDebugInfo.cpp lib/CodeGen/CGDebugInfo.h lib/CodeGen

[PATCH] D49916: [CodeGen] Add to emitted DebugLoc information about coverage when it's required

2018-08-29 Thread calixte via Phabricator via cfe-commits
calixte updated this revision to Diff 163062. calixte added a comment. - Use ImplicitCode instead of Covered - Set Artificial location as ImplicitCode to avoid coverage on landing pads Repository: rC Clang https://reviews.llvm.org/D49916 Files: lib/CodeGen/CGDebugInfo.cpp lib/CodeGen/CGD

[PATCH] D49916: [CodeGen] Add to emitted DebugLoc information about coverage when it's required

2018-07-27 Thread calixte via Phabricator via cfe-commits
calixte created this revision. calixte added reviewers: marco-c, davidxl. Herald added a subscriber: cfe-commits. Some lines have a hit counter where they should not have one. Cleanup stuff is located to the last line of the body which is most of the time a '}'. And Exception stuff is added at th