Page MenuHomePhabricator

calixte (calixte)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 20 2018, 8:06 AM (78 w, 1 d)

Recent Activity

Mon, Jan 6

calixte added a comment to D70910: [compiler-rt] Add a critical section when flushing gcov counters.

OK that helps a bit. I still don't understand though: why do you only need to protect flush and nothing else? You're protecting specific variables from being accesses concurrently only though flush, and not through the other paths that access those variables. Are these variables never accessed concurrently from these other functions?

Mon, Jan 6, 4:16 AM · Restricted Project, Restricted Project

Dec 12 2019

calixte added a comment to D70910: [compiler-rt] Add a critical section when flushing gcov counters.

@jfb, sorry I thought my commit message was clear enough.
So when coverage is enabled a call to __gcov_flush is inserted just before forkcall:
https://github.com/llvm/llvm-project/blob/master/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp#L659
So if the parent process is forked in different threads then __gcov_flush is called from different threads.
And so different global variables are accessed asynchronously:
https://github.com/llvm/llvm-project/blob/master/compiler-rt/lib/profile/GCDAProfiling.c#L104-L108
Initially we saw crashes in our CI: https://bugzilla.mozilla.org/show_bug.cgi?id=1599436
The above test case leads to multiple errors: double-free, "cannot merge previous GCDA file..."
And in debbuging firefox, I saw output_file == NULL (https://github.com/llvm/llvm-project/blob/master/compiler-rt/lib/profile/GCDAProfiling.c#L603) where it mustn't.

Dec 12 2019, 11:00 AM · Restricted Project, Restricted Project

Dec 10 2019

calixte added a comment to D70910: [compiler-rt] Add a critical section when flushing gcov counters.

@vsk: the test compiler-rt/trunk/test/profile/instrprof-darwin-exports.c was failing probably because of the missing static on gcov_flush_mutex, could you check that it's ok for you ?

Dec 10 2019, 4:30 AM · Restricted Project, Restricted Project
calixte updated the diff for D70910: [compiler-rt] Add a critical section when flushing gcov counters.

Make symbol gcov_flush_mutex private

Dec 10 2019, 4:30 AM · Restricted Project, Restricted Project
calixte added a reviewer for D70910: [compiler-rt] Add a critical section when flushing gcov counters: vsk.
Dec 10 2019, 4:30 AM · Restricted Project, Restricted Project
calixte reopened D70910: [compiler-rt] Add a critical section when flushing gcov counters.
Dec 10 2019, 1:56 AM · Restricted Project, Restricted Project
calixte added a comment to D70910: [compiler-rt] Add a critical section when flushing gcov counters.

@ahatanak it's probably a problem with Darwin.cpp where I need to add some exported symbols.
@jfb sorry but it fixes issues with fork:

  • we had a lot of crashes in Firefox CI when dumping the GCDAs and so I tried this patch on the CI and no more weird crashes.
  • and a minimal test case to reproduce it:
#include <iostream>
#include <thread>
#include <vector>
#include <unistd.h>
Dec 10 2019, 1:28 AM · Restricted Project, Restricted Project

Dec 3 2019

calixte updated the diff for D70910: [compiler-rt] Add a critical section when flushing gcov counters.

Use HEAD~3 with arc diff

Dec 3 2019, 1:51 AM · Restricted Project, Restricted Project
calixte updated the diff for D70910: [compiler-rt] Add a critical section when flushing gcov counters.

Remove unused function

Dec 3 2019, 1:37 AM · Restricted Project, Restricted Project
calixte updated the diff for D70910: [compiler-rt] Add a critical section when flushing gcov counters.

Use SRWLock instead of a CRITICAL_SECTION.

Dec 3 2019, 1:23 AM · Restricted Project, Restricted Project

Dec 2 2019

calixte retitled D70910: [compiler-rt] Add a critical section when flushing gcov counters from Add a critical section when flushing gcov counters to [compiler-rt] Add a critical section when flushing gcov counters.
Dec 2 2019, 10:43 AM · Restricted Project, Restricted Project
calixte created D70910: [compiler-rt] Add a critical section when flushing gcov counters.
Dec 2 2019, 10:25 AM · Restricted Project, Restricted Project

Nov 28 2018

calixte updated the diff for D54599: [Profile] Avoid race condition when dumping GCDA files..

Make a more concise code.

Nov 28 2018, 9:18 AM
calixte updated the diff for D55003: Two extra spaces have been added in unittests/Analysis/TargetLibraryInfoTest.cpp when ran clang-format-diff on it.

Remove spaces at the beginning of lines

Nov 28 2018, 7:10 AM
calixte created D55003: Two extra spaces have been added in unittests/Analysis/TargetLibraryInfoTest.cpp when ran clang-format-diff on it.
Nov 28 2018, 7:06 AM
calixte added inline comments to rL346318: Fix unit tests after patch https://reviews.llvm.org/rL346313.
Nov 28 2018, 3:42 AM

Nov 17 2018

calixte committed rL347144: [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to….
[Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to…
Nov 17 2018, 11:44 AM
calixte committed rC347144: [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to….
[Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to…
Nov 17 2018, 11:44 AM
calixte closed 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).
Nov 17 2018, 11:44 AM
calixte updated the diff for D54599: [Profile] Avoid race condition when dumping GCDA files..
  • Update code to take into account what's wrong when fd==-1
  • Add a test for GCOV_PREFIX
Nov 17 2018, 8:52 AM
calixte abandoned D54213: [Profile] Mark gcov-fork test as failinf for i386 target.
Nov 17 2018, 3:52 AM

Nov 15 2018

calixte updated the summary of D54599: [Profile] Avoid race condition when dumping GCDA files..
Nov 15 2018, 2:35 PM
calixte added inline comments to D54599: [Profile] Avoid race condition when dumping GCDA files..
Nov 15 2018, 2:26 PM
calixte updated the summary of D54599: [Profile] Avoid race condition when dumping GCDA files..
Nov 15 2018, 2:25 PM
calixte created 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).
Nov 15 2018, 2:03 PM
calixte created D54599: [Profile] Avoid race condition when dumping GCDA files..
Nov 15 2018, 1:50 PM

Nov 12 2018

calixte added a comment to rL346644: [GCOV] fix test after patch rL346642.

@RKSimon, thanks, I reverted.

Nov 12 2018, 7:03 AM
calixte committed rL346659: Revert rL346644, rL346642: the added test test/CodeGen/code-coverage-filter.c….
Revert rL346644, rL346642: the added test test/CodeGen/code-coverage-filter.c…
Nov 12 2018, 7:00 AM
calixte added a reverting change for rL346642: [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to…: rL346659: Revert rL346644, rL346642: the added test test/CodeGen/code-coverage-filter.c….
Nov 12 2018, 7:00 AM
calixte added a reverting change for rL346644: [GCOV] fix test after patch rL346642: rL346659: Revert rL346644, rL346642: the added test test/CodeGen/code-coverage-filter.c….
Nov 12 2018, 7:00 AM
calixte committed rC346659: Revert rL346644, rL346642: the added test test/CodeGen/code-coverage-filter.c….
Revert rL346644, rL346642: the added test test/CodeGen/code-coverage-filter.c…
Nov 12 2018, 6:59 AM
calixte added a comment to rL346644: [GCOV] fix test after patch rL346642.

@RKSimon, do you have an example fo failure, because I didn't get anything on mail nor on irc channel ?

Nov 12 2018, 6:42 AM
calixte committed rC346644: [GCOV] fix test after patch rL346642.
[GCOV] fix test after patch rL346642
Nov 12 2018, 1:55 AM
calixte committed rL346644: [GCOV] fix test after patch rL346642.
[GCOV] fix test after patch rL346642
Nov 12 2018, 1:55 AM
calixte closed D54416: [GCOV] fix test after patch rL346642.
Nov 12 2018, 1:55 AM
calixte updated the summary of D54416: [GCOV] fix test after patch rL346642.
Nov 12 2018, 1:49 AM
calixte created D54416: [GCOV] fix test after patch rL346642.
Nov 12 2018, 1:48 AM
calixte committed rL346642: [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to….
[Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to…
Nov 12 2018, 1:15 AM
calixte committed rC346642: [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to….
[Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to…
Nov 12 2018, 1:15 AM
calixte closed D52034: [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to filter the files to instrument with gcov.
Nov 12 2018, 1:15 AM
calixte committed rL346641: [GCOV] Add options to filter files which must be instrumented..
[GCOV] Add options to filter files which must be instrumented.
Nov 12 2018, 1:04 AM
calixte closed D52033: [GCOV] Add options to filter files which must be instrumented..
Nov 12 2018, 1:04 AM
calixte updated the diff for D52034: [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to filter the files to instrument with gcov.

Forgot the ellipsis in the release notes.

Nov 12 2018, 12:50 AM
calixte updated the diff for D52034: [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to filter the files to instrument with gcov.

Update ReleaseNotes

Nov 12 2018, 12:47 AM

Nov 8 2018

calixte committed rL346409: [Profile] The test for gcov-fork seems to be ok on arm.
[Profile] The test for gcov-fork seems to be ok on arm
Nov 8 2018, 8:18 AM
calixte committed rCRT346409: [Profile] The test for gcov-fork seems to be ok on arm.
[Profile] The test for gcov-fork seems to be ok on arm
Nov 8 2018, 8:18 AM
calixte closed D54263: [Profile] The test for gcov-fork seems to be ok on arm.
Nov 8 2018, 8:18 AM
calixte created D54263: [Profile] The test for gcov-fork seems to be ok on arm.
Nov 8 2018, 7:19 AM

Nov 7 2018

calixte created D54213: [Profile] Mark gcov-fork test as failinf for i386 target.
Nov 7 2018, 9:09 AM
calixte committed rL346329: [Profile] Mark gcov-fork test as failing for arm.
[Profile] Mark gcov-fork test as failing for arm
Nov 7 2018, 8:00 AM
calixte committed rCRT346329: [Profile] Mark gcov-fork test as failing for arm.
[Profile] Mark gcov-fork test as failing for arm
Nov 7 2018, 8:00 AM
calixte closed D54209: [Profile] Mark gcov-fork test as failing for arm.
Nov 7 2018, 8:00 AM
calixte created D54209: [Profile] Mark gcov-fork test as failing for arm.
Nov 7 2018, 7:26 AM
calixte committed rL346318: Fix unit tests after patch https://reviews.llvm.org/rL346313.
Fix unit tests after patch https://reviews.llvm.org/rL346313
Nov 7 2018, 6:49 AM
calixte closed D54208: Fix unit tests after patch https://reviews.llvm.org/rL346313.
Nov 7 2018, 6:48 AM
calixte updated the diff for D54208: Fix unit tests after patch https://reviews.llvm.org/rL346313.

Fix nit.

Nov 7 2018, 6:47 AM
calixte added inline comments to D54208: Fix unit tests after patch https://reviews.llvm.org/rL346313.
Nov 7 2018, 6:47 AM
calixte created D54208: Fix unit tests after patch https://reviews.llvm.org/rL346313.
Nov 7 2018, 6:42 AM
calixte committed rL346314: [Profile] Fix fork test and add tests for execlp and execvp after patch https….
[Profile] Fix fork test and add tests for execlp and execvp after patch https…
Nov 7 2018, 5:53 AM
calixte committed rCRT346314: [Profile] Fix fork test and add tests for execlp and execvp after patch https….
[Profile] Fix fork test and add tests for execlp and execvp after patch https…
Nov 7 2018, 5:53 AM
calixte closed D54167: [Profile] Fix fork test and add tests for execlp and execvp after patch https://reviews.llvm.org/D53593.
Nov 7 2018, 5:53 AM
calixte committed rL346313: [GCOV] Flush counters before to avoid counting the execution before fork twice….
[GCOV] Flush counters before to avoid counting the execution before fork twice…
Nov 7 2018, 5:53 AM
calixte closed D53593: [GCOV] Flush counters before to avoid counting the execution before fork twice and for exec** functions we must flush before the call.
Nov 7 2018, 5:53 AM
calixte updated the diff for D54167: [Profile] Fix fork test and add tests for execlp and execvp after patch https://reviews.llvm.org/D53593.

Fix execvp test.

Nov 7 2018, 5:29 AM
calixte updated the diff for D53593: [GCOV] Flush counters before to avoid counting the execution before fork twice and for exec** functions we must flush before the call.

Handle execve, fix issues with execvp and remove _WIN32.

Nov 7 2018, 5:29 AM
calixte accepted D53988: Close file mapping handle on Windows, so flushed gcda files can be removed while the process is in execution.

Looks good to me.

Nov 7 2018, 1:30 AM
calixte added a reviewer for D51974: [GCOV] Handle correctly multiple CUs when profiling: marco-c.
Nov 7 2018, 1:07 AM
calixte updated the diff for D52034: [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to filter the files to instrument with gcov.

Update doc.

Nov 7 2018, 12:52 AM

Nov 6 2018

calixte created D54167: [Profile] Fix fork test and add tests for execlp and execvp after patch https://reviews.llvm.org/D53593.
Nov 6 2018, 11:22 AM
calixte retitled D53593: [GCOV] Flush counters before to avoid counting the execution before fork twice and for exec** functions we must flush before the call from [GCOV] Flush counters before forking to avoid counting the execution before fork twice to [GCOV] Flush counters before to avoid counting the execution before fork twice and for exec** functions we must flush before the call.
Nov 6 2018, 11:18 AM
calixte updated the diff for D53593: [GCOV] Flush counters before to avoid counting the execution before fork twice and for exec** functions we must flush before the call.

Fix comments from vsk and handle exec** functions too.

Nov 6 2018, 11:16 AM
calixte updated the diff for D52034: [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to filter the files to instrument with gcov.

Fix plural form of regex and just use ';' as separator.

Nov 6 2018, 6:49 AM
calixte updated the diff for D52033: [GCOV] Add options to filter files which must be instrumented..

Fix plural form of regex and just use ';' as separator.

Nov 6 2018, 6:49 AM
calixte retitled D52034: [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to filter the files to instrument with gcov from [Clang] Add options -Xclang -coverage-filter and -Xclang -coverage-exclude to filter the files to instrument with gcov to [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to filter the files to instrument with gcov.
Nov 6 2018, 6:19 AM
calixte updated the diff for D52034: [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to filter the files to instrument with gcov.

Change options names to -fprofile-exclude-files & -fprofile-filter-files and add some doc in UserManual.

Nov 6 2018, 6:18 AM
calixte updated the diff for D52033: [GCOV] Add options to filter files which must be instrumented..

Regexs separator is ':' for Unix and ';' for Windows

Nov 6 2018, 6:14 AM
calixte added inline comments to D53988: Close file mapping handle on Windows, so flushed gcda files can be removed while the process is in execution.
Nov 6 2018, 2:35 AM

Oct 30 2018

calixte committed rCRT345625: [GCOV] Add a test for function defined on one line (follow-up of https….
[GCOV] Add a test for function defined on one line (follow-up of https…
Oct 30 2018, 11:44 AM
calixte committed rL345625: [GCOV] Add a test for function defined on one line (follow-up of https….
[GCOV] Add a test for function defined on one line (follow-up of https…
Oct 30 2018, 11:44 AM
calixte closed D53601: [GCOV] Add a test for function defined on one line (follow-up of https://reviews.llvm.org/D53600).
Oct 30 2018, 11:43 AM
calixte committed rL345624: [GCOV] Function counters are wrong when on one line.
[GCOV] Function counters are wrong when on one line
Oct 30 2018, 11:43 AM
calixte closed D53600: [GCOV] Function counters are wrong when on one line.
Oct 30 2018, 11:43 AM
calixte added inline comments to D53593: [GCOV] Flush counters before to avoid counting the execution before fork twice and for exec** functions we must flush before the call.
Oct 30 2018, 10:16 AM

Oct 23 2018

calixte updated the summary of D53600: [GCOV] Function counters are wrong when on one line.
Oct 23 2018, 12:10 PM
calixte created D53601: [GCOV] Add a test for function defined on one line (follow-up of https://reviews.llvm.org/D53600).
Oct 23 2018, 12:10 PM
calixte created D53600: [GCOV] Function counters are wrong when on one line.
Oct 23 2018, 12:06 PM
calixte created D53593: [GCOV] Flush counters before to avoid counting the execution before fork twice and for exec** functions we must flush before the call.
Oct 23 2018, 11:20 AM
calixte created D53578: [CodeGen] Fix clang test for gcov profiling (follow-up of D51974).
Oct 23 2018, 8:23 AM · Restricted Project
calixte retitled D51974: [GCOV] Handle correctly multiple CUs when profiling from [GCOV] Remove useless loop when emiting edge counters to [GCOV] Handle correctly multiple CUs when profiling.
Oct 23 2018, 8:16 AM
calixte updated the diff for D51974: [GCOV] Handle correctly multiple CUs when profiling.

Fix multiple CUs stuff and add a test (thanks to vsk).

Oct 23 2018, 8:13 AM

Oct 18 2018

calixte added a comment to D52034: [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to filter the files to instrument with gcov.

@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 ?

Oct 18 2018, 4:42 AM

Oct 11 2018

calixte committed rL344229: [profile] Fix the gcov tests after the patch in D49853 landed..
[profile] Fix the gcov tests after the patch in D49853 landed.
Oct 11 2018, 1:55 AM
calixte committed rCRT344229: [profile] Fix the gcov tests after the patch in D49853 landed..
[profile] Fix the gcov tests after the patch in D49853 landed.
Oct 11 2018, 1:55 AM
calixte closed D49854: [profile] Fix the gcov tests after the patch in D49853 landed..
Oct 11 2018, 1:55 AM
calixte committed rL344228: [gcov] Display the hit counter for the line of a function definition.
[gcov] Display the hit counter for the line of a function definition
Oct 11 2018, 1:55 AM
calixte closed D49853: [gcov] Display the hit counter for the line of a function definition.
Oct 11 2018, 1:55 AM
calixte updated the diff for D49853: [gcov] Display the hit counter for the line of a function definition.

Don't get EntryBlock again

Oct 11 2018, 1:46 AM

Oct 10 2018

calixte updated the diff for D49854: [profile] Fix the gcov tests after the patch in D49853 landed..

Fix profile tests

Oct 10 2018, 10:25 AM

Sep 26 2018

calixte added a comment to D52034: [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to filter the files to instrument with gcov.

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). So could you give a me a clue please ?

Sep 26 2018, 4:23 AM
calixte updated the diff for D52034: [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to filter the files to instrument with gcov.

Fix tests

Sep 26 2018, 4:17 AM