A question about the trace reading

4 views
Skip to first unread message

Ying

unread,
Sep 11, 2006, 2:22:50 PM9/11/06
to cbp2
Hi, all,
In the souce "trace.cc" of cbp2 infrastructure, constant ASSOC is
defined as 8 at line 169. But from line 262, according to the comment
part, it was considered as 4, if I understand correctly. Part of the
codes are shown below.

// the byte is a correct prediction if it is less than 8;
// otherwise it is the first byte (a code) in a 9-byte trace

correct = c < ASSOC*2;
if (correct) {

// if the byte is at least 4 then it means that we have
// a correct return address prediction

ras_correct = c >= ASSOC;

// subtract off 4 for a correct return address prediction

if (ras_correct) c -= ASSOC;
..............

I don't step into the compresison mechanism here so I don't know if it
will cause any problem or not. But if it can be clarified, it will be
greatly appreciated.

Thanks.
Ying

djimenez

unread,
Sep 12, 2006, 5:23:44 PM9/12/06
to cbp2
Hi, Ying.

The "4" is left over from an earlier version. It should read "8".
This causes no problem.
--
Daniel Jiménez

Reply all
Reply to author
Forward
0 new messages