-
Notifications
You must be signed in to change notification settings - Fork 44
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
Is the gprof.exe
related content working well?
#111
Comments
gprof is part of binutils, of which version 2.39 was recently released. You can check if you're still using an older version with: Also GCC 11.3.0 is not the most recent. Can you try with the latest winlibs release from https://github.com/brechtsanders/winlibs_mingw/releases/tag/12.1.0-14.0.6-10.0.0-msvcrt-r3 ? Do you have example |
In the latest winlibs release still have this problem.a.c is the Minimized Test Samples
#include <stdio.h>
int fbnq(int);
int fbnq(int n)
{
if (n <= 2)
{
return 1;
}
return fbnq(n - 1) + fbnq(n - 2);
}
int main(void)
{
printf("fbnq(8) is %d\n", fbnq(8));
return 0;
} gcc --version
gcc (MinGW-W64 x86_64-msvcrt-posix-seh, built by Brecht Sanders) 12.1.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. gprof --version
GNU gprof (Binutils for MinGW-W64 x86_64, built by Brecht Sanders) 2.39
Based on BSD gprof, copyright 1983 Regents of the University of California.
This program is free software. This program has absolutely no warranty. |
I actually tried the latest version before, but I forgot to write it in the markdown above, it's only in the file name. 😄 |
I actually get the same output as you with the latest release: gcc -pg -g -O0 -c -o a.o a.c && gcc -pg -g a.o -o a.exe && ./a.exe && gprof a.exe gmon.out My output starts with:
So it looks like I can reproduce it, but I'm no expert in gprof on Windows. The question is: is this an issue in GCC generating the |
I guess is gcc's issue. You can read my first message on this issue, which is written in an ordered list. Or you can download one and try it out. |
By the way, I see that the releases of this repository are |
The I do see a lot of forums saying |
Thanks for your answer, I got it. But it seems that I use some functions that take up a lot of time, and still have the same problem. I am on gcc-8.1.0, even 0.01s can output normally. |
This build of mingw64 offers win32 threads: https://github.com/niXman/mingw-builds-binaries/releases |
I don't see how this relates to Win32 threads. For the winlibs build it was decided to only make POSIX thread releases as these also provide Win32 threads support and it makes it possible to port a lot more libraries originally written for POSIX threads. |
I use my gcc-8.1.0 on sourceforge works well.
(
.\gmon.out
file generated by running the programa.exe
because of the option-pg
)But the software I downloaded from the releases of this repository can't output this text file normally
like this
It's output only a table header. no content.
After my test. it may not
gprof.exe
mistake.So I guess it is gcc problem.
output file here.
gcc-8.1.0-from-sourceforge.txt
gcc-11.3.0-or-12.1.0.txt
The text was updated successfully, but these errors were encountered: