[PATCH] D48538: Make __gcov_flush flush counters for all shared libraries

Marco Castelluccio via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 26 14:15:23 PDT 2018


marco-c added inline comments.


================
Comment at: lib/profile/GCDAProfiling.c:524
+    prev = writeout_fn_head;
+    while (prev->next != writeout_fn_this);
+    prev->next = writeout_fn_this->next;
----------------
davidxl wrote:
> This code looks wrong.    I don't see how this can delete all write nodes from this dynamic object.  
Aargh, I don't know what I was thinking here, I'll fix it.


================
Comment at: test/profile/Inputs/instrprof-dlopen-func.c.gcov:6
+// CHECK-NEXT:        -:    0:Programs:1
+// CHECK-NEXT:        3:    1:void func(int K) { if (K) {} }
----------------
davidxl wrote:
> this is not correct. func is executed only once.
I think this is pre-existing behavior unfortunately, I'll test again without the patch.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D48538





More information about the llvm-commits mailing list