X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "Ben Collver (bencollver AT tilde DOT pink) [via djgpp AT delorie DOT com]" Newsgroups: comp.os.msdos.djgpp Subject: gprof report incomplete Date: Sun, 31 Jul 2022 22:34:45 -0000 (UTC) Organization: A noiseless patient Spider Lines: 79 Message-ID: Injection-Date: Sun, 31 Jul 2022 22:34:45 -0000 (UTC) Injection-Info: reader01.eternal-september.org; posting-host="751ef69a8ccef7ae698861047f95b1a1"; logging-data="542046"; mail-complaints-to="abuse AT eternal-september DOT org"; posting-account="U2FsdGVkX185msZsReTCe8Kuyn+NqWNdAmOb3ZmGcIA=" User-Agent: slrn/1.0.3 (Linux) Cancel-Lock: sha1:cubJS+aOtsk5dKBQxiEqXn404lE= Bytes: 2669 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I am trying to use gprof in DJGPP 2.05. I wrote a small test program named hello.c. On Linux, gprof correctly reports 10 calls to function helloworld. With DJGPP, gprof reports an undefined number of calls to __dpmi_int and nothing else. I have included the program source and output below [1]. I reviewed the DJGPP FAQ chapter 13 to verify that i ran gprof correctly. https://www.delorie.com/djgpp/v2faq/faq13_1.html I am not sure how to troubleshoot this further. Any other ideas? Thanks! -Ben [1] bash-5.1$ cat hello.c #include void helloworld(void) { printf("hello world\r\n"); } int main(int argc, char *argv[]) { int i; for (i = 0; i < 10; i++) { helloworld(); } } bash-5.1$ gcc -pg -o hello hello.c bash-5.1$ ./hello hello world hello world hello world hello world hello world hello world hello world hello world hello world hello world bash-5.1$ gprof hello|head 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 0.00 0.00 0.00 10 0.00 0.00 helloworld % the percentage of the total running time of the C:\>gcc --version gcc.exe (GCC) 7.2.0 ... C:\>gcc -pg -o hello.exe hello.c C:\>hello.exe hello world hello world hello world hello world hello world hello world hello world hello world hello world hello world C:\>gprof hello.exe | head Flat profile: Each sample counts as 0.0555556 seconds. % cumulative self self total time seconds seconds calls Ts/call Ts/call name 100.00 0.11 0.11 __dpmi_int % the percentage of the total running time of the time program used by this function. C:\>