Hi All
Reading another thread prompted me to try -profile , since I have not used it since
my last Windows project.
The compile command is simply: fbc -v -profile
Then when I run the program and then exit it, I get the following error :
_mcleanup: gmon_out: Permission Denied.
I have checked the permissions and they are OK.
Is this a problem with execute permissions of _mcleanup or with writing the gmon.out.
The gmon.out file was never created when I went looking for it.
Anyone have any ideas as to why the error ?
Regards
Profiling Error
Re: Profiling Error
No problem here
(Scientific Linux)
Which is pretty much Red Hat Linux.
(Scientific Linux)
Which is pretty much Red Hat Linux.
Code: Select all
[dodicat@localhost basic]$ fbc -v -profile worm.bas
FreeBASIC Compiler - Version 1.05.0 (01-31-2016), built for linux-x86 (32bit)
Copyright (C) 2004-2016 The FreeBASIC development team.
target: linux-x86, 486, 32bit
compiling: worm.bas -o worm.asm (main module)
assembling: as --32 --strip-local-absolute "worm.asm" -o "worm.o"
linking: ld -m elf_i386 -o "worm" -dynamic-linker /lib/ld-linux.so.2 "/usr/local/bin/../lib/freebasic/linux-x86/fbextra.x" -L "/usr/local/bin/../lib/freebasic/linux-x86" -L "." -L "/usr/lib/gcc/i686-redhat-linux/4.4.7" -L "/usr/X11R6/lib" "/usr/lib/gcc/i686-redhat-linux/4.4.7/../../../gcrt1.o" "/usr/lib/gcc/i686-redhat-linux/4.4.7/../../../crti.o" "/usr/lib/gcc/i686-redhat-linux/4.4.7/crtbegin.o" "/usr/local/bin/../lib/freebasic/linux-x86/fbrt0.o" "worm.o" "-(" -lfb -lfbgfx -lX11 -lXext -lXpm -lXrandr -lXrender -ltinfo -lm -ldl -lpthread -lgcc -lgcc_eh -lc "-)" "/usr/lib/gcc/i686-redhat-linux/4.4.7/crtend.o" "/usr/lib/gcc/i686-redhat-linux/4.4.7/../../../crtn.o"
Re: Profiling Error
Hi All
Thanks for the reply dodicat.
I am using Linux Mint 18.3
If I run the profiled program as the normal user, there is the error.
If I run it as Root, there is no error, BUT it puts the gmon.out in a totally unrelated folder. /media/username/gmon.out
When running gprof as root however I get an error:
gprof: gmon.out: not in executable format.
Read somewhere that there may be different versions of gprof, with one on of them dedicated to FB ??
Will search and see.
EDIT: Typical mistake of assuming that the file to run with gprof is gmon.out.
Instead of gprof MyProgram > MyProgram.txt which then causes gprof to look for gmon.out
REgards
Thanks for the reply dodicat.
I am using Linux Mint 18.3
If I run the profiled program as the normal user, there is the error.
If I run it as Root, there is no error, BUT it puts the gmon.out in a totally unrelated folder. /media/username/gmon.out
When running gprof as root however I get an error:
gprof: gmon.out: not in executable format.
Read somewhere that there may be different versions of gprof, with one on of them dedicated to FB ??
Will search and see.
EDIT: Typical mistake of assuming that the file to run with gprof is gmon.out.
Instead of gprof MyProgram > MyProgram.txt which then causes gprof to look for gmon.out
REgards