|
From: Tom C. <tc...@cs...> - 2007-03-25 19:25:42
|
Dear all, This may be off-topic, but I'd been pointed towards something in the Valgrind Manual: http://valgrind.org/docs/manual/manual-core.html#manual-core.pthreads particularly: "It switches threads every 50000 basic blocks (on x86, typically around 300000 instructions)..." My question isn't about thread-handling, but about where this figure came from - I'm working on code optimisation and have been trying to find some statistics about the size of basic blocks and instruction frequency. Does anyone have any information about this figure? Thanks and regards, Tom -- Tom Crick Mathematical Foundations Group Department of Computer Science University of Bath tc...@cs... http://www.cs.bath.ac.uk/tom/ |
|
From: Julian S. <js...@ac...> - 2007-03-25 20:59:49
|
> particularly: "It switches threads every 50000 basic blocks (on x86, > typically around 300000 instructions)..." > find some statistics about the size of basic blocks and instruction > frequency. Does anyone have any information about this figure? You mean the implied bb length of 6 (== 300000/50000) ? No idea, probably got made up by the person writing the documentation :-) I think it's the right sort of ballpack though. Wouldn't Hennessy and Patterson contain info on average bb lengths? It's stuffed full of that kind of info. (and generally a great book) In any case you can measure it directly. Run with --tool=lackey --vex-guest-chase-thresh=no and divide "guest instrs" by "SBs entered". That gives me 4.9 for a start/exit of konqueror. Oh, in fact it even computes it for you. What more can you ask: ==3134== guest instrs : SB entered = 49 : 10 J |