You could hack up custom m5op magic instructions easily by copying
existing ones, but I think it still takes up a memory fetch/decode.

Better than that, only if you hack a way to do something when a given
PC is reached. Maybe have a look at how Linux detects panics by
reading the PC of the panic symbol and try to adapt something similar.

On Fri, Jan 10, 2020 at 6:44 PM Subhankar Pal <s...@umich.edu> wrote:
>
> Hi!
>
> I am trying to profile code in detail running on a MinorCPU in SE mode. I'd 
> like to add profiling instructions into my code, whose execution shouldn't 
> affect the timing and the code should take the same time to run as it would 
> without those instructions. At minimum, the profiling instruction should 
> print the current Tick, memObject name and a word of data that I pass use as 
> an argument to call it with. Right now, I'm approximating this by doing a 
> store to a special address that causes the minorCPU to throw the desired 
> print. However, this method is not 0-overhead. Does anyone have better 
> suggestions?
>
> Thanks in advance!
>
> Subhankar Pal  |  PhD Candidate, CSE  |  University of Michigan
> _______________________________________________
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to