[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

llvm-svn: 344229
This commit is contained in:
Calixte Denizet 2018-10-11 08:53:55 +00:00
parent d2f290b034
commit 589fff9c71
14 changed files with 19 additions and 19 deletions

View File

@ -7,7 +7,7 @@
// CHECK-NEXT: -: 2:#include <stdio.h> // CHECK-NEXT: -: 2:#include <stdio.h>
// CHECK-NEXT: -: 3:#include <stdlib.h> // CHECK-NEXT: -: 3:#include <stdlib.h>
// CHECK-NEXT: -: 4: // 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: 6: dlerror();
// CHECK-NEXT: 1: 7: void *f1_handle = dlopen("func.shared", RTLD_LAZY | RTLD_GLOBAL); // CHECK-NEXT: 1: 7: void *f1_handle = dlopen("func.shared", RTLD_LAZY | RTLD_GLOBAL);
// CHECK-NEXT: 1: 8: if (f1_handle == NULL) { // CHECK-NEXT: 1: 8: if (f1_handle == NULL) {

View File

@ -7,7 +7,7 @@
// CHECK-NEXT: -: 2:#include <stdio.h> // CHECK-NEXT: -: 2:#include <stdio.h>
// CHECK-NEXT: -: 3:#include <stdlib.h> // CHECK-NEXT: -: 3:#include <stdlib.h>
// CHECK-NEXT: -: 4: // 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: 6: dlerror();
// CHECK-NEXT: 1: 7: void *f1_handle = dlopen("func.shared", RTLD_LAZY | RTLD_GLOBAL); // CHECK-NEXT: 1: 7: void *f1_handle = dlopen("func.shared", RTLD_LAZY | RTLD_GLOBAL);
// CHECK-NEXT: 1: 8: if (f1_handle == NULL) { // CHECK-NEXT: 1: 8: if (f1_handle == NULL) {

View File

@ -5,10 +5,10 @@
// CHECK-NEXT: -: 0:Programs:1 // CHECK-NEXT: -: 0:Programs:1
// CHECK-NEXT: -: 1:#include <string> // CHECK-NEXT: -: 1:#include <string>
// CHECK-NEXT: -: 2: // 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: 1: 4:}
// CHECK-NEXT: -: 5: // CHECK-NEXT: -: 5:
// CHECK-NEXT: -: 6:int main(void) // CHECK-NEXT: 1: 6:int main(void)
// CHECK-NEXT: -: 7:{ // CHECK-NEXT: -: 7:{
// CHECK-NEXT: 1: 8: asd("22"); // CHECK-NEXT: 1: 8: asd("22");
// CHECK-NEXT: -: 9: // CHECK-NEXT: -: 9:

View File

@ -4,7 +4,7 @@
// CHECK-NEXT: -: 0:Runs:1 // CHECK-NEXT: -: 0:Runs:1
// CHECK-NEXT: -: 0:Programs:1 // CHECK-NEXT: -: 0:Programs:1
// CHECK-NEXT:function main called 1 returned 100% blocks executed 80% // 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: -: 2:{
// CHECK-NEXT: -: 3: int var; // CHECK-NEXT: -: 3: int var;
// CHECK-NEXT: -: 4: // CHECK-NEXT: -: 4:

View File

@ -3,7 +3,7 @@
// CHECK-NEXT: -: 0:Data:instrprof-gcov-switch1.gcda // CHECK-NEXT: -: 0:Data:instrprof-gcov-switch1.gcda
// CHECK-NEXT: -: 0:Runs:1 // CHECK-NEXT: -: 0:Runs:1
// CHECK-NEXT: -: 0:Programs:1 // CHECK-NEXT: -: 0:Programs:1
// CHECK-NEXT: -: 1:int main(void) // CHECK-NEXT: 1: 1:int main(void)
// CHECK-NEXT: -: 2:{ // CHECK-NEXT: -: 2:{
// CHECK-NEXT: 1: 3: int i = 22; // CHECK-NEXT: 1: 3: int i = 22;
// CHECK-NEXT: -: 4: // CHECK-NEXT: -: 4:

View File

@ -3,7 +3,7 @@
// CHECK-NEXT: -: 0:Data:instrprof-gcov-switch2.gcda // CHECK-NEXT: -: 0:Data:instrprof-gcov-switch2.gcda
// CHECK-NEXT: -: 0:Runs:1 // CHECK-NEXT: -: 0:Runs:1
// CHECK-NEXT: -: 0:Programs:1 // CHECK-NEXT: -: 0:Programs:1
// CHECK-NEXT: -: 1:int main(void) // CHECK-NEXT: 1: 1:int main(void)
// CHECK-NEXT: -: 2:{ // CHECK-NEXT: -: 2:{
// CHECK-NEXT: 1: 3: int i = 22; // CHECK-NEXT: 1: 3: int i = 22;
// CHECK-NEXT: -: 4: // CHECK-NEXT: -: 4:

View File

@ -6,7 +6,7 @@
// CHECK-NEXT: -: 1:int g1 = 0; // CHECK-NEXT: -: 1:int g1 = 0;
// CHECK-NEXT: -: 2:int g2 = 1; // CHECK-NEXT: -: 2:int g2 = 1;
// CHECK-NEXT: -: 3: // 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: 1: 5: if (n % 5 == 0)
// CHECK-NEXT: #####: 6: g1++; // CHECK-NEXT: #####: 6: g1++;
// CHECK-NEXT: -: 7: else // CHECK-NEXT: -: 7: else

View File

@ -6,7 +6,7 @@
// CHECK-NEXT: -: 1:int g1 = 0; // CHECK-NEXT: -: 1:int g1 = 0;
// CHECK-NEXT: -: 2:int g2 = 1; // CHECK-NEXT: -: 2:int g2 = 1;
// CHECK-NEXT: -: 3: // 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: 2: 5: if (n % 5 == 0)
// CHECK-NEXT: #####: 6: g1++; // CHECK-NEXT: #####: 6: g1++;
// CHECK-NEXT: -: 7: else // CHECK-NEXT: -: 7: else

View File

@ -6,7 +6,7 @@
// CHECK-NEXT: -: 1:int g1 = 0; // CHECK-NEXT: -: 1:int g1 = 0;
// CHECK-NEXT: -: 2:int g2 = 1; // CHECK-NEXT: -: 2:int g2 = 1;
// CHECK-NEXT: -: 3: // 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: 1000000: 5: if (n % 5 == 0)
// CHECK-NEXT: 360000: 6: g1++; // CHECK-NEXT: 360000: 6: g1++;
// CHECK-NEXT: -: 7: else // CHECK-NEXT: -: 7: else

View File

@ -9,14 +9,14 @@
// CHECK-NEXT: -: 4:int bar1 = 0; // CHECK-NEXT: -: 4:int bar1 = 0;
// CHECK-NEXT: -: 5:int bar2 = 1; // CHECK-NEXT: -: 5:int bar2 = 1;
// CHECK-NEXT: -: 6: // 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: 8: if (n % 5 == 0)
// CHECK-NEXT: 1: 9: bar1++; // CHECK-NEXT: 1: 9: bar1++;
// CHECK-NEXT: -: 10: else // CHECK-NEXT: -: 10: else
// CHECK-NEXT: #####: 11: bar2++; // CHECK-NEXT: #####: 11: bar2++;
// CHECK-NEXT: 1: 12:} // CHECK-NEXT: 1: 12:}
// CHECK-NEXT: -: 13: // 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: -: 15:#ifdef SHARED_CALL_BEFORE_GCOV_FLUSH
// CHECK-NEXT: 1: 16: foo(1); // CHECK-NEXT: 1: 16: foo(1);
// CHECK-NEXT: -: 17:#endif // CHECK-NEXT: -: 17:#endif

View File

@ -9,14 +9,14 @@
// CHECK-NEXT: -: 4:int bar1 = 0; // CHECK-NEXT: -: 4:int bar1 = 0;
// CHECK-NEXT: -: 5:int bar2 = 1; // CHECK-NEXT: -: 5:int bar2 = 1;
// CHECK-NEXT: -: 6: // 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: 8: if (n % 5 == 0)
// CHECK-NEXT: 3: 9: bar1++; // CHECK-NEXT: 3: 9: bar1++;
// CHECK-NEXT: -: 10: else // CHECK-NEXT: -: 10: else
// CHECK-NEXT: #####: 11: bar2++; // CHECK-NEXT: #####: 11: bar2++;
// CHECK-NEXT: 3: 12:} // CHECK-NEXT: 3: 12:}
// CHECK-NEXT: -: 13: // 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: -: 15:#ifdef SHARED_CALL_BEFORE_GCOV_FLUSH
// CHECK-NEXT: -: 16: foo(1); // CHECK-NEXT: -: 16: foo(1);
// CHECK-NEXT: -: 17:#endif // CHECK-NEXT: -: 17:#endif

View File

@ -9,14 +9,14 @@
// CHECK-NEXT: -: 4:int bar1 = 0; // CHECK-NEXT: -: 4:int bar1 = 0;
// CHECK-NEXT: -: 5:int bar2 = 1; // CHECK-NEXT: -: 5:int bar2 = 1;
// CHECK-NEXT: -: 6: // 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: 8: if (n % 5 == 0)
// CHECK-NEXT: 3: 9: bar1++; // CHECK-NEXT: 3: 9: bar1++;
// CHECK-NEXT: -: 10: else // CHECK-NEXT: -: 10: else
// CHECK-NEXT: #####: 11: bar2++; // CHECK-NEXT: #####: 11: bar2++;
// CHECK-NEXT: 3: 12:} // CHECK-NEXT: 3: 12:}
// CHECK-NEXT: -: 13: // 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: -: 15:#ifdef SHARED_CALL_BEFORE_GCOV_FLUSH
// CHECK-NEXT: 1: 16: foo(1); // CHECK-NEXT: 1: 16: foo(1);
// CHECK-NEXT: -: 17:#endif // CHECK-NEXT: -: 17:#endif

View File

@ -9,14 +9,14 @@
// CHECK-NEXT: -: 4:int bar1 = 0; // CHECK-NEXT: -: 4:int bar1 = 0;
// CHECK-NEXT: -: 5:int bar2 = 1; // CHECK-NEXT: -: 5:int bar2 = 1;
// CHECK-NEXT: -: 6: // 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: 8: if (n % 5 == 0)
// CHECK-NEXT: 3: 9: bar1++; // CHECK-NEXT: 3: 9: bar1++;
// CHECK-NEXT: -: 10: else // CHECK-NEXT: -: 10: else
// CHECK-NEXT: #####: 11: bar2++; // CHECK-NEXT: #####: 11: bar2++;
// CHECK-NEXT: 3: 12:} // CHECK-NEXT: 3: 12:}
// CHECK-NEXT: -: 13: // 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: -: 15:#ifdef SHARED_CALL_BEFORE_GCOV_FLUSH
// CHECK-NEXT: 1: 16: foo(1); // CHECK-NEXT: 1: 16: foo(1);
// CHECK-NEXT: -: 17:#endif // CHECK-NEXT: -: 17:#endif

View File

@ -6,7 +6,7 @@
// CHECK-NEXT: -: 1:extern int g1, g2; // CHECK-NEXT: -: 1:extern int g1, g2;
// CHECK-NEXT: -: 2:extern void foo(int n); // CHECK-NEXT: -: 2:extern void foo(int n);
// CHECK-NEXT: -: 3: // CHECK-NEXT: -: 3:
// CHECK-NEXT: -: 4:int main() { // CHECK-NEXT: 1: 4:int main() {
// CHECK-NEXT: -: 5: int i, j; // CHECK-NEXT: -: 5: int i, j;
// CHECK-NEXT: 1001: 6: for (i = 0; i < 1000; i++) // CHECK-NEXT: 1001: 6: for (i = 0; i < 1000; i++)
// CHECK-NEXT: 1001000: 7: for (j = 0; j < 1000; j++) // CHECK-NEXT: 1001000: 7: for (j = 0; j < 1000; j++)