You're talking about replacing return flags[t]; with a space optimized bit vector? I imagine it would help performance some if for no other reason that the trace flags would fit is a single cache block rather than spanning multiple as they do now.
Ali On Sep 23, 2008, at 2:42 AM, Gabe Black wrote: > I just finished stepping through some code having to do with PCs in > simple CPU, and I noticed that not printing DPRINTFs is actually a > fairly involved process, considering that you're not actually doing > anything. Part of the issue, I think, is that whether or not a > traceflag > is on is stored in a vector of Bools. Since the size of the vector > won't > change often (ever?) would it make sense to just make it a char [] and > use something like the following? > > flags[t >> 3] & (1 << (t & 3)); > > > I realize when you've got tracing on you're not going for blazing > speed > in the first place, but if it's easy to tighten it up a bit that's > probably a good idea. The other possibility is that it's actually not > doing a whole lot but calling through a bunch of functions gdb stops > at > one at a time. That would look like a lot of work to someone stepping > through with gdb but could be just as fast. > > Gabe > _______________________________________________ > m5-dev mailing list > [email protected] > http://m5sim.org/mailman/listinfo/m5-dev > _______________________________________________ m5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/m5-dev
