Hello, everyone

Recently I had a problem: my system is losing network connectivity,
although the interface (vio0 on KVM) seemed up. Restarting the
connection with `ifconfig vio0 down` and `ifconfig vio0 up` restores the
connection.

However, when I timed the execution, I found that the second `up` can
take up to 15 minutes. (Hugely unexpected!) To find out where the
program is waiting, I decided to recompile ifconfig from source with
debugging and profiling support.

Slightly adjusting the commands provided by the Makefile, I came up with
the following commands:

```
egcc -O0 -g -pg -fPIC  -Werror-implicit-function-declaration  -c ifconfig.c
egcc -O0 -g -pg -fPIC  -Werror-implicit-function-declaration  -c brconfig.c
egcc -O0 -g -pg -fPIC  -Werror-implicit-function-declaration  -c sff.c
egcc  -g -pg -shared -pie -o ifconfig ifconfig.o brconfig.o sff.o -lc -pg
```

However, when I run ./ifconfig compiled like this, I am getting (besides
the output of ifconfig itself) the following error message:

```
gmon.out: No such file or directory
```

I find this unexpected. Compiling and linking a simple helloworld with
-pg -g seems to be working fine, and gmon.out is produced as expected.

What am I doing wrong? Is there something specific that needs to be
permitted to profile ifconfig?

-- 
Your sincerely,
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)

Reply via email to