1 # Test of the llmv-dwarfdump --statistics with split dwarf (dwo files)
4 # Create a directory in which to put all files, so .o file can find .dwo file.
5 RUN: rm -rf %t && mkdir -p %t
6 RUN: cp -f %S/Inputs/statistics-fib.split-dwarf.s %t/.
8 RUN: llvm-mc -triple x86_64-unknown-linux-gnu statistics-fib.split-dwarf.s -filetype=obj -split-dwarf-file statistics-fib.split-dwarf.dwo -o statistics-fib.split-dwarf.o
9 RUN: llvm-dwarfdump --statistics statistics-fib.split-dwarf.o | FileCheck %s
11 # Source program - A version of Fibonacci
12 # Compilation options: -gsplit-dwarf -O3 -c -S
15 # real_fib (int x, int answers[11])
19 # if ((answers)[x] != -1)
20 # return (answers)[x];
22 # result = real_fib(x-1, answers) + real_fib(x-2, answers);
23 # (answers)[x] = result;
37 # for (i = 0; i < 11; i++)
44 # return real_fib(x, answers);
47 # int main (int argc, char **argv)
52 # printf ("fibonacci(3) = %d\n", result);
54 # printf ("fibonacci(4) = %d\n", result);
56 # printf ("fibonacci(5) = %d\n", result);
58 # printf ("fibonacci(6) = %d\n", result);
60 # printf ("fibonacci(7) = %d\n", result);
62 # printf ("fibonacci(8) = %d\n", result);
64 # printf ("fibonacci(9) = %d\n", result);
66 # printf ("fibonacci(10) = %d\n", result);
73 CHECK: "source functions":3
74 CHECK: "source functions with location":3
75 CHECK: "inlined functions":7
76 CHECK: "inlined funcs with abstract origins":7
77 CHECK: "unique source variables":9
78 CHECK: "source variables":30
80 # Ideally the value below would be 33 but currently it's not.
81 CHECK: "variables with location":22
82 CHECK: "call site entries":7
83 CHECK: "scope bytes total":2817
84 CHECK: "scope bytes covered":506
85 CHECK: "total function size":594
86 CHECK: "total inlined function size":345
87 CHECK: "total formal params":12
88 CHECK: "formal params with source location":12
89 CHECK: "formal params with type":12
90 CHECK: "formal params with binary location":12
91 CHECK: "total vars":18
92 CHECK: "vars with source location":18
93 CHECK: "vars with type":18
95 # Ideally the value below would be 18, but currently it's not.
96 CHECK: "vars with binary location":10