Hello, I've been using gem5 for ~10 years, and this is the first time I've ever seen this code :D. It was committed 14 years ago, and it hasn't been touched since.
It looks to me like it's used for gathering statistics about the activity of different CPU pipeline stages. However, I *know* it's not actively maintained, so I would guess that it doesn't work anymore. As far as what it's doing, I think the comment in activity.hh is probably the best explanation: http://doxygen.gem5.org/release/current/classActivityRecorder.html#details Cheers, Jason On Tue, Nov 3, 2020 at 4:49 AM yujiecui--- via gem5-users < [email protected]> wrote: > What does TimeBuffer in gem5 do? I read its source code, but there are no > comments and it is not easy to understand operations. I saw in the tick > function in the cpu.cc file that every tick() will proceed > timeBuffer.advance(); > fetchQueue.advance(); > decodeQueue.advance(); > renameQueue.advance(); > iewQueue.advance(); > But the function of advance is > advance() > { > if (++base >= size) > base = 0; > int ptr = base + future; > if (ptr >= (int)size) > ptr -= size; > (reinterpret_cast<T *>(index[ptr]))->~T(); > std::memset(index[ptr], 0, sizeof(T)); > new (index[ptr]) T; > } > Just looking at the source code, this is really hard to understand. I > think if someone can tell me what it is doing? I think it’s easier for me > to understand this code > _______________________________________________ > gem5-users mailing list -- [email protected] > To unsubscribe send an email to [email protected] > %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
_______________________________________________ gem5-users mailing list -- [email protected] To unsubscribe send an email to [email protected] %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
