Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SystemZ: Missing gprof support #121137

Open
wzssyqa opened this issue Dec 26, 2024 · 0 comments
Open

SystemZ: Missing gprof support #121137

wzssyqa opened this issue Dec 26, 2024 · 0 comments

Comments

@wzssyqa
Copy link
Contributor

wzssyqa commented Dec 26, 2024

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  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants