There is the profile parameter on the BaseCPU that samples the current
location of the PC at a given interval. However, I think this only works
with FS mode, so you'd need to make sore changes so it woudl work with
SE mode (mostly around finding the symbol table I think). Additionally,
the BaseCPU has a function_trace parameter which prints the time each
function is entered and exists. You may be able to create the data you
want from this output. 

Thanks, 

Ali 

On 13.05.2014 09:57, Steve Reinhardt via gem5-dev wrote: 

> 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 [1]
> 
> _______________________________________________
> gem5-dev mailing list
> [email protected]
> http://m5sim.org/mailman/listinfo/gem5-dev [1]

 

Links:
------
[1] http://m5sim.org/mailman/listinfo/gem5-dev
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to