Gprof takes over the RTC (irq 8). If you have code which uses the oskit interrupt request mechanism to grab irq 8, it won't work. If your code just steals irq 8 by replacing the interrupt handler for it, you'll break gprof.
Gprof installs some atexit handlers for the kernel 'main'. These are installed in base_multiboot_main.c.