Skip to content

Commit

Permalink
test with empty softcounter output
Browse files Browse the repository at this point in the history
  • Loading branch information
ahueck committed Dec 29, 2020
1 parent 4fe7358 commit 4381f11
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions test/runtime/18_softcounter_empty.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// RUN: %run %s -O3 2>&1 | FileCheck %s
// REQUIRED: softcounter

void __typeart_leave_scope(int alloca_count);

int main(void) {
__typeart_leave_scope(0); // This simply "triggers" the runtime
return 0;
}

// CHECK: Alloc Stats from softcounters
// CHECK-NEXT: Total heap : 0 , 0 , -
// CHECK-NEXT: Total stack : 0 , 0 , -
// CHECK-NEXT: Total global : 0 , 0 , -
// CHECK-NEXT: Max. Heap Allocs : 0 , - , -
// CHECK-NEXT: Max. Stack Allocs : 0 , - , -
// CHECK-NEXT: Addresses checked : 0 , - , -
// CHECK-NEXT: Distinct Addresses checked : 0 , - , -
// CHECK-NEXT: Addresses re-used : 0 , - , -
// CHECK-NEXT: Addresses missed : 0 , - , -
// CHECK-NEXT: Distinct Addresses missed : 0 , - , -
// CHECK-NEXT: Total free heap : 0 , 0 , -
// CHECK-NEXT: Total free stack : 0 , 0 , -
// CHECK-NEXT: Null/Zero/NullZero Addr : 0 , 0 , 0
// CHECK-NEXT: User-def. types : 0 , - , -
// CHECK-NEXT: Estimated memory use (KiB) : 4 , - , -
// CHECK-NEXT: Bytes per node map/stack : 96 , 8 , -
// CHECK-NEXT: {{(#|-)+}}
// CHECK-NEXT: Allocation type detail (heap, stack, global)
// CHECK: {{(#|-)+}}
// CHECK-NEXT: Free allocation type detail (heap, stack)

0 comments on commit 4381f11

Please sign in to comment.