Vishaal, That is a common observation.
"Zeros: Zero is by far the most frequently seen value in application data [4, 9, 33]. There are various reasons for this. For example, zero is most commonly used to initialize data, to represent NULL pointers or false boolean values, and to represent sparse matrices (in dense form). In fact, a majority of the compression schemes proposed for compressing memory data either base their design fully around zeros [9, 8, 15, 31], or treat zero as a special case [2, 32, 34]." Source: http://www.cs.cmu.edu/~gpekhime/Papers/pact12_pekhimenko.pdf Thanks and regards, Poovaiah On Thu, Oct 16, 2014 at 7:34 AM, Vishaal Mohan via gem5-users < gem5-users@gem5.org> wrote: > Hello everyone, > A similar question was asked before but I don't think it was answered > completely. I am trying to get a trace of the data that is written into the > L2 cache. I made data in packet.hh public and tried to print > (int)*(pkt->data). > For example, in handlefill() in cache_impl.hh > > // if we got new data, copy it in > if (pkt->isRead()) { > std::memcpy(blk->data, pkt->getPtr<uint8_t>(), blkSize); > DPRINTF(CacheData,"command, %s, address, %s, data, %d\n",pkt->cmdString(), > pkt->getAddr(), (int)*(pkt->getPtr<uint8_t>())); > } > > I found that most of the data values printed in the trace are 0. Is this > right? > Thank you. > --Vishaal Mohan > > _______________________________________________ > gem5-users mailing list > gem5-users@gem5.org > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users > -- Poovaiah MP
_______________________________________________ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users