[compiler-rt] r344229 - [profile] Fix the gcov tests after the patch in D49853 landed.
Calixte Denizet via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 11 01:53:56 PDT 2018
Author: calixte
Date: Thu Oct 11 01:53:55 2018
New Revision: 344229
URL: http://llvm.org/viewvc/llvm-project?rev=344229&view=rev
Log:
[profile] Fix the gcov tests after the patch in D49853 landed.
Summary:
The goal of the patch in D49853 is to display counter on the line of function definition.
So some tests need to be fixed.
Reviewers: marco-c, davidxl
Reviewed By: marco-c
Subscribers: sylvestre.ledru, delcypher, llvm-commits, #sanitizers
Differential Revision: https://reviews.llvm.org/D49854
Modified:
compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-dlclose-main.c.gcov
compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-dlclose-main_three-libs.c.gcov
compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-exceptions.cpp.gcov
compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-multiple-bbs-single-line.c.gcov
compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-switch1.c.gcov
compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-switch2.c.gcov
compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib.c.gcov
compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib_called-twice.c.gcov
compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib_in-loop.c.gcov
compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_no-writeout.c.gcov
compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-after.c.gcov
compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before-after.c.gcov
compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before.c.gcov
compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main.c.gcov
Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-dlclose-main.c.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-dlclose-main.c.gcov?rev=344229&r1=344228&r2=344229&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-dlclose-main.c.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-dlclose-main.c.gcov Thu Oct 11 01:53:55 2018
@@ -7,7 +7,7 @@
// CHECK-NEXT: -: 2:#include <stdio.h>
// CHECK-NEXT: -: 3:#include <stdlib.h>
// CHECK-NEXT: -: 4:
-// CHECK-NEXT: -: 5:int main(int argc, char *argv[]) {
+// CHECK-NEXT: 1: 5:int main(int argc, char *argv[]) {
// CHECK-NEXT: 1: 6: dlerror();
// CHECK-NEXT: 1: 7: void *f1_handle = dlopen("func.shared", RTLD_LAZY | RTLD_GLOBAL);
// CHECK-NEXT: 1: 8: if (f1_handle == NULL) {
Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-dlclose-main_three-libs.c.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-dlclose-main_three-libs.c.gcov?rev=344229&r1=344228&r2=344229&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-dlclose-main_three-libs.c.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-dlclose-main_three-libs.c.gcov Thu Oct 11 01:53:55 2018
@@ -7,7 +7,7 @@
// CHECK-NEXT: -: 2:#include <stdio.h>
// CHECK-NEXT: -: 3:#include <stdlib.h>
// CHECK-NEXT: -: 4:
-// CHECK-NEXT: -: 5:int main(int argc, char *argv[]) {
+// CHECK-NEXT: 1: 5:int main(int argc, char *argv[]) {
// CHECK-NEXT: 1: 6: dlerror();
// CHECK-NEXT: 1: 7: void *f1_handle = dlopen("func.shared", RTLD_LAZY | RTLD_GLOBAL);
// CHECK-NEXT: 1: 8: if (f1_handle == NULL) {
Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-exceptions.cpp.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-exceptions.cpp.gcov?rev=344229&r1=344228&r2=344229&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-exceptions.cpp.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-exceptions.cpp.gcov Thu Oct 11 01:53:55 2018
@@ -5,10 +5,10 @@
// CHECK-NEXT: -: 0:Programs:1
// CHECK-NEXT: -: 1:#include <string>
// CHECK-NEXT: -: 2:
-// CHECK-NEXT: -: 3:void asd(std::string i) {
+// CHECK-NEXT: 1: 3:void asd(std::string i) {
// CHECK-NEXT: 1: 4:}
// CHECK-NEXT: -: 5:
-// CHECK-NEXT: -: 6:int main(void)
+// CHECK-NEXT: 1: 6:int main(void)
// CHECK-NEXT: -: 7:{
// CHECK-NEXT: 1: 8: asd("22");
// CHECK-NEXT: -: 9:
Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-multiple-bbs-single-line.c.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-multiple-bbs-single-line.c.gcov?rev=344229&r1=344228&r2=344229&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-multiple-bbs-single-line.c.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-multiple-bbs-single-line.c.gcov Thu Oct 11 01:53:55 2018
@@ -4,7 +4,7 @@
// CHECK-NEXT: -: 0:Runs:1
// CHECK-NEXT: -: 0:Programs:1
// CHECK-NEXT:function main called 1 returned 100% blocks executed 80%
-// CHECK-NEXT: -: 1:int main(void)
+// CHECK-NEXT: 1: 1:int main(void)
// CHECK-NEXT: -: 2:{
// CHECK-NEXT: -: 3: int var;
// CHECK-NEXT: -: 4:
Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-switch1.c.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-switch1.c.gcov?rev=344229&r1=344228&r2=344229&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-switch1.c.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-switch1.c.gcov Thu Oct 11 01:53:55 2018
@@ -3,7 +3,7 @@
// CHECK-NEXT: -: 0:Data:instrprof-gcov-switch1.gcda
// CHECK-NEXT: -: 0:Runs:1
// CHECK-NEXT: -: 0:Programs:1
-// CHECK-NEXT: -: 1:int main(void)
+// CHECK-NEXT: 1: 1:int main(void)
// CHECK-NEXT: -: 2:{
// CHECK-NEXT: 1: 3: int i = 22;
// CHECK-NEXT: -: 4:
Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-switch2.c.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-switch2.c.gcov?rev=344229&r1=344228&r2=344229&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-switch2.c.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-switch2.c.gcov Thu Oct 11 01:53:55 2018
@@ -3,7 +3,7 @@
// CHECK-NEXT: -: 0:Data:instrprof-gcov-switch2.gcda
// CHECK-NEXT: -: 0:Runs:1
// CHECK-NEXT: -: 0:Programs:1
-// CHECK-NEXT: -: 1:int main(void)
+// CHECK-NEXT: 1: 1:int main(void)
// CHECK-NEXT: -: 2:{
// CHECK-NEXT: 1: 3: int i = 22;
// CHECK-NEXT: -: 4:
Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib.c.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib.c.gcov?rev=344229&r1=344228&r2=344229&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib.c.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib.c.gcov Thu Oct 11 01:53:55 2018
@@ -6,7 +6,7 @@
// CHECK-NEXT: -: 1:int g1 = 0;
// CHECK-NEXT: -: 2:int g2 = 1;
// CHECK-NEXT: -: 3:
-// CHECK-NEXT: -: 4:void foo(int n) {
+// CHECK-NEXT: 1: 4:void foo(int n) {
// CHECK-NEXT: 1: 5: if (n % 5 == 0)
// CHECK-NEXT: #####: 6: g1++;
// CHECK-NEXT: -: 7: else
Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib_called-twice.c.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib_called-twice.c.gcov?rev=344229&r1=344228&r2=344229&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib_called-twice.c.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib_called-twice.c.gcov Thu Oct 11 01:53:55 2018
@@ -6,7 +6,7 @@
// CHECK-NEXT: -: 1:int g1 = 0;
// CHECK-NEXT: -: 2:int g2 = 1;
// CHECK-NEXT: -: 3:
-// CHECK-NEXT: -: 4:void foo(int n) {
+// CHECK-NEXT: 2: 4:void foo(int n) {
// CHECK-NEXT: 2: 5: if (n % 5 == 0)
// CHECK-NEXT: #####: 6: g1++;
// CHECK-NEXT: -: 7: else
Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib_in-loop.c.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib_in-loop.c.gcov?rev=344229&r1=344228&r2=344229&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib_in-loop.c.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib_in-loop.c.gcov Thu Oct 11 01:53:55 2018
@@ -6,7 +6,7 @@
// CHECK-NEXT: -: 1:int g1 = 0;
// CHECK-NEXT: -: 2:int g2 = 1;
// CHECK-NEXT: -: 3:
-// CHECK-NEXT: -: 4:void foo(int n) {
+// CHECK-NEXT: 1000000: 4:void foo(int n) {
// CHECK-NEXT: 1000000: 5: if (n % 5 == 0)
// CHECK-NEXT: 360000: 6: g1++;
// CHECK-NEXT: -: 7: else
Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_no-writeout.c.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_no-writeout.c.gcov?rev=344229&r1=344228&r2=344229&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_no-writeout.c.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_no-writeout.c.gcov Thu Oct 11 01:53:55 2018
@@ -9,14 +9,14 @@
// CHECK-NEXT: -: 4:int bar1 = 0;
// CHECK-NEXT: -: 5:int bar2 = 1;
// CHECK-NEXT: -: 6:
-// CHECK-NEXT: -: 7:void bar(int n) {
+// CHECK-NEXT: 1: 7:void bar(int n) {
// CHECK-NEXT: 1: 8: if (n % 5 == 0)
// CHECK-NEXT: 1: 9: bar1++;
// CHECK-NEXT: -: 10: else
// CHECK-NEXT: #####: 11: bar2++;
// CHECK-NEXT: 1: 12:}
// CHECK-NEXT: -: 13:
-// CHECK-NEXT: -: 14:int main(int argc, char *argv[]) {
+// CHECK-NEXT: 1: 14:int main(int argc, char *argv[]) {
// CHECK-NEXT: -: 15:#ifdef SHARED_CALL_BEFORE_GCOV_FLUSH
// CHECK-NEXT: 1: 16: foo(1);
// CHECK-NEXT: -: 17:#endif
Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-after.c.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-after.c.gcov?rev=344229&r1=344228&r2=344229&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-after.c.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-after.c.gcov Thu Oct 11 01:53:55 2018
@@ -9,14 +9,14 @@
// CHECK-NEXT: -: 4:int bar1 = 0;
// CHECK-NEXT: -: 5:int bar2 = 1;
// CHECK-NEXT: -: 6:
-// CHECK-NEXT: -: 7:void bar(int n) {
+// CHECK-NEXT: 3: 7:void bar(int n) {
// CHECK-NEXT: 3: 8: if (n % 5 == 0)
// CHECK-NEXT: 3: 9: bar1++;
// CHECK-NEXT: -: 10: else
// CHECK-NEXT: #####: 11: bar2++;
// CHECK-NEXT: 3: 12:}
// CHECK-NEXT: -: 13:
-// CHECK-NEXT: -: 14:int main(int argc, char *argv[]) {
+// CHECK-NEXT: 1: 14:int main(int argc, char *argv[]) {
// CHECK-NEXT: -: 15:#ifdef SHARED_CALL_BEFORE_GCOV_FLUSH
// CHECK-NEXT: -: 16: foo(1);
// CHECK-NEXT: -: 17:#endif
Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before-after.c.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before-after.c.gcov?rev=344229&r1=344228&r2=344229&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before-after.c.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before-after.c.gcov Thu Oct 11 01:53:55 2018
@@ -9,14 +9,14 @@
// CHECK-NEXT: -: 4:int bar1 = 0;
// CHECK-NEXT: -: 5:int bar2 = 1;
// CHECK-NEXT: -: 6:
-// CHECK-NEXT: -: 7:void bar(int n) {
+// CHECK-NEXT: 3: 7:void bar(int n) {
// CHECK-NEXT: 3: 8: if (n % 5 == 0)
// CHECK-NEXT: 3: 9: bar1++;
// CHECK-NEXT: -: 10: else
// CHECK-NEXT: #####: 11: bar2++;
// CHECK-NEXT: 3: 12:}
// CHECK-NEXT: -: 13:
-// CHECK-NEXT: -: 14:int main(int argc, char *argv[]) {
+// CHECK-NEXT: 1: 14:int main(int argc, char *argv[]) {
// CHECK-NEXT: -: 15:#ifdef SHARED_CALL_BEFORE_GCOV_FLUSH
// CHECK-NEXT: 1: 16: foo(1);
// CHECK-NEXT: -: 17:#endif
Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before.c.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before.c.gcov?rev=344229&r1=344228&r2=344229&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before.c.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before.c.gcov Thu Oct 11 01:53:55 2018
@@ -9,14 +9,14 @@
// CHECK-NEXT: -: 4:int bar1 = 0;
// CHECK-NEXT: -: 5:int bar2 = 1;
// CHECK-NEXT: -: 6:
-// CHECK-NEXT: -: 7:void bar(int n) {
+// CHECK-NEXT: 3: 7:void bar(int n) {
// CHECK-NEXT: 3: 8: if (n % 5 == 0)
// CHECK-NEXT: 3: 9: bar1++;
// CHECK-NEXT: -: 10: else
// CHECK-NEXT: #####: 11: bar2++;
// CHECK-NEXT: 3: 12:}
// CHECK-NEXT: -: 13:
-// CHECK-NEXT: -: 14:int main(int argc, char *argv[]) {
+// CHECK-NEXT: 1: 14:int main(int argc, char *argv[]) {
// CHECK-NEXT: -: 15:#ifdef SHARED_CALL_BEFORE_GCOV_FLUSH
// CHECK-NEXT: 1: 16: foo(1);
// CHECK-NEXT: -: 17:#endif
Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main.c.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main.c.gcov?rev=344229&r1=344228&r2=344229&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main.c.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main.c.gcov Thu Oct 11 01:53:55 2018
@@ -6,7 +6,7 @@
// CHECK-NEXT: -: 1:extern int g1, g2;
// CHECK-NEXT: -: 2:extern void foo(int n);
// CHECK-NEXT: -: 3:
-// CHECK-NEXT: -: 4:int main() {
+// CHECK-NEXT: 1: 4:int main() {
// CHECK-NEXT: -: 5: int i, j;
// CHECK-NEXT: 1001: 6: for (i = 0; i < 1000; i++)
// CHECK-NEXT: 1001000: 7: for (j = 0; j < 1000; j++)
More information about the llvm-commits
mailing list