• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Linux How use gprof with TFS 0.2?

Kayan

Active Member
Joined
Sep 19, 2007
Messages
1,561
Reaction score
38
Location
Santa Catarina
I already try compile with -g and -pg

and after with i open!

gprof -b forgottenserver gmon.out > results.txt

I receive this message!

gmon.out: file too short to be a gmon file

Maybe i compile wrong? i don't remember how use gprof, if somebody can help me with it!

:$
 
Everything alriteh here (herp Using the same compiler flags you stated, -pg (profile code), -g (debugging symbols) derp)...

gali@debian:~/Desktop/botx/web_server_fortehlulz/bin$ dir
Debug Release
gali@debian:~/Desktop/botx/web_server_fortehlulz/bin$ ./Debug/web_server_fortehlulz
^Cgali@debian:~/Desktop/botx/web_server_fortehlulz/bin$ dir
Debug gmon.out Release
gali@debian:~/Desktop/botx/web_server_fortehlulz/bin$ gprof -b Debug/web_server_fortehlulz gmon.out > results.txt
gali@debian:~/Desktop/botx/web_server_fortehlulz/bin$ dir
Debug gmon.out Release results.txt
gali@debian:~/Desktop/botx/web_server_fortehlulz/bin$ file results.txt
results.txt: ASCII C program text, with very long lines
gali@debian:~/Desktop/botx/web_server_fortehlulz/bin$ du -h results.txt
1.3M results.txt
https://i.imgur.com/b8RJU.png

However, I'm not using TFS. But still, It should work like charm. You sure you did it correctly? I bet you probb forgot to execute TFS before using gprof.
 
Last edited:
Back
Top