177,182d176
< // Broadcast / filter upward snoops
< const bool filter_upward = true; // @todo: Make configurable
<
< if (!filter_upward)
< return snoopAll(lookupLatency);
<
191,194c185,188
< // If the snoop filter has no entry and its an uncacheable
< // request, do not create a new snoop filter entry, simply return
< // a NULL portlist.
< if (!is_hit && cpkt->req->isUncacheable())
---
> // If the snoop filter has no entry, simply return a NULL
> // portlist, there is no point creating an entry only to remove it
> // later
> if (!is_hit)
197,199d190
< // If no hit in snoop filter create a new element and update iterator
< if (!is_hit)
< sf_it = cachedLocations.emplace(line_addr, SnoopItem()).first;
208,214c199,204
< if (is_hit) {
< // Single bit set -> value is a power of two
< if (isPow2(interested))
< hitSingleSnoops++;
< else
< hitMultiSnoops++;
< }
---
> // Single bit set -> value is a power of two
> if (isPow2(interested))
> hitSingleSnoops++;
> else
> hitMultiSnoops++;
>
298a289,291
> assert(cpkt->isResponse());
> assert(cpkt->memInhibitAsserted());
>
301,304c294
< if (sf_it == cachedLocations.end())
< sf_it = cachedLocations.emplace(line_addr, SnoopItem()).first;
< SnoopItem& sf_item = sf_it->second;
< SnoopMask rsp_mask M5_VAR_USED = portToMask(rsp_port);
---
> bool is_hit = sf_it != cachedLocations.end();
306,307c296,298
< assert(cpkt->isResponse());
< assert(cpkt->memInhibitAsserted());
---
> // Nothing to do if it is not a hit
> if (!is_hit)
> return;
308a300,301
> SnoopItem& sf_item = sf_it->second;
>
312,313c305,307
< // Remote (to this snoop filter) snoops update the filter already when they
< // arrive from below, because we may not see any response.
---
> // Remote (to this snoop filter) snoops update the filter
> // already when they arrive from below, because we may not see
> // any response.
315c309,310
< // If the request to this snoop response hit an in-flight transaction,
---
> // If the request to this snoop response hit an in-flight
> // transaction,
322a318
>