You could implement the setitimer syscall, but the bigger issue is that a
software sampling-based profiler like gprof isn't really appropriate to run
inside a simulator like gem5.  gprof counts on a long enough runtime to
gather a lot of samples, which will take forever to run on a simulator.
 Meanwhile, in theory anyway, you can collect all the statistics you like
via gem5 without disturbing the simulated program's execution.

In practice, I don't know that there's any built-in support for application
profiling in gem5 (am I forgetting something?).  It wouldn't be too hard to
add a periodic event that recorded the PC values of all the cores, which
would give you a first-level sampling of where time is being spent (though
without the call stack info that gprof gives you).

Has anyone else done anything like this?

Steve



On Mon, May 12, 2014 at 9:35 PM, 朱朱乐乐 via gem5-dev <[email protected]>wrote:

> Hi, everyone.
>
> I want to use gprof in SE mode of gem5, And I compiled my app with -pg by
> gcc.
>
> I run command like this:
>
> ./build/X86/gem5.opt configs/example/se.py -c mybench/queens_gprof  -o 10
>
> but I get error as :
>
> fatal: syscall setitimer (#38) unimplemented.
>  @ cycle 3736500
> [unimplementedFunc:build/X86/sim/syscall_emul.cc, line 83]
>
> Any idea on how to fix this?
> _______________________________________________
> gem5-dev mailing list
> [email protected]
> http://m5sim.org/mailman/listinfo/gem5-dev
>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to