Skip to content

SystemZ: Missing gprof support #121137

@wzssyqa

Description

@wzssyqa
int fib(int n) {return n <=1 ? 1 : fib(n-1) + fib(n-2); }
int main() {fib(10); return 0;}

How to test native:

bin/clang -pg test.c && ./a.out && gprof -b a.out gmon.out

How to test cross with qemu-user

apt install gcc-s390x-linux-gnu qemu-user-static
bin/clang --target=s390x-linux-gnu -pg test.c -static && ./a.out && gprof -b a.out gmon.out

Known problem:

$ bin/clang --target=s390x-linux-gnu -pg n.c -O2 -static && ./a.out && gprof -b ./a.out gmon.out 
Flat profile:

Each sample counts as 0.01 seconds.
 no time accumulated

  %   cumulative   self              self     total           
 time   seconds   seconds    calls  Ts/call  Ts/call  name  

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions