[gem5-users] Re: Build error while adding statistics

2024-01-19 Thread Arth Shah via gem5-users
Please resolve this query.
I dug deeper and realized MSHRQueue is not inherited from SimObject.
So, it wouldn't support using various statistics macros and classes this
easily.
I have now successfully added the stats I'm interested in as part of the
BaseCache class.

On Thu, Jan 18, 2024 at 7:31 PM Arth Shah  wrote:

> Hi everyone,
>
> I'm attempting to add statistics to the Classic cache's mshr_queue.
> There was no stats struct already so I tried to follow the steps in
> Bootcamp to add one.
> I see the following error though. Could you help?
>
>  src/mem/cache/mshr_queue.cc:59:48: *error: no matching function for call
> to* ‘gem5::MSHRQueue::MshrStats::MshrStats(gem5::MSHRQueue*)’
>stats(this), demandReserve(demand_reserve)
>
>
> Here are the main set of changes.
>
> *mshr_queue.hh*
>
> class MSHRQueue : public Queue {
>
> ...
>
> struct MshrStats : public statistics::Group
> {
> MshrStats(statistics::Group *parent);
>
> /** Number of times an entry was inserted in MSHR. */
> statistics::Scalar mshrInserts;
>
> } stats;
> ...
>
> }
>
> *mshr_queue.cc*
>
> ...
> MSHRQueue::MSHRQueue(const std::string &_label,
>  int num_entries, int reserve,
>  int demand_reserve, std::string cache_name = "")
> : Queue(_label, num_entries, reserve, cache_name + ".mshr_queue"
> ),
>   stats(this), demandReserve(demand_reserve)
> {}
>
> ...
> MSHRQueue::MshrStats::MshrStats(statistics::Group *parent)
> : statistics::Group(parent),
> ADD_STAT(mshrInserts, statistics::units::Count::get(),
>  "Number of times an entry was inserted in MSHR")
> {}
>
>
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Build error while adding statistics

2024-01-18 Thread Arth Shah via gem5-users
Hi everyone,

I'm attempting to add statistics to the Classic cache's mshr_queue.
There was no stats struct already so I tried to follow the steps in
Bootcamp to add one.
I see the following error though. Could you help?

 src/mem/cache/mshr_queue.cc:59:48: *error: no matching function for call
to* ‘gem5::MSHRQueue::MshrStats::MshrStats(gem5::MSHRQueue*)’
   stats(this), demandReserve(demand_reserve)


Here are the main set of changes.

*mshr_queue.hh*

class MSHRQueue : public Queue {

...

struct MshrStats : public statistics::Group
{
MshrStats(statistics::Group *parent);

/** Number of times an entry was inserted in MSHR. */
statistics::Scalar mshrInserts;

} stats;
...

}

*mshr_queue.cc*

...
MSHRQueue::MSHRQueue(const std::string &_label,
 int num_entries, int reserve,
 int demand_reserve, std::string cache_name = "")
: Queue(_label, num_entries, reserve, cache_name + ".mshr_queue"),
  stats(this), demandReserve(demand_reserve)
{}

...
MSHRQueue::MshrStats::MshrStats(statistics::Group *parent)
: statistics::Group(parent),
ADD_STAT(mshrInserts, statistics::units::Count::get(),
 "Number of times an entry was inserted in MSHR")
{}
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Understanding Squashed Loads/Stores

2023-11-21 Thread Arth Shah via gem5-users
Hi everyone,

I'm running a benchmark on the O3CPU model (aarch64) and see something
strange that I wasn't able to understand. I see a lot of Squashed loads and
stores in the LSQ but it doesn't seem like it is due to
branch misprediction or Cache blockages. What else could cause this
magnitude of squashes in LSQ?

cpu.lsq0.squashedLoads   657977
cpu.lsq0.squashedStores  1386633

cpu.lsq0.blockedByCache0
cpu.iew.branchMispredicts   31

Thanks,
Arth
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Multiple debug files

2023-10-17 Thread Arth Shah via gem5-users
Hi everyone,

I am aware that there is a way to specify multiple debug flags in comma
separated formatting.
e.g.  --debug-flags=O3PipeView,Cache,HWPrefetch
Also, there is an option to print these debug messages into a file.
e.g. --debug-file=debug_log
Is there any option available to direct these debug flag output into
corresponding individual files?

I'm currently using grep to extract what I need from the single
'debug-file' which takes significant time when the file is huge for a
longer simulation.

Thanks in advance,
Arth
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org