I have a .cpp file with various methods:
void foo() {
...
}
I will compile it:
g++ test.cpp -o test.o -S
And now I want to determine, from consideration test.o, how many bytes of memory an instruction takes foo(). How can i do this?
I ask, because through careful profiling and experimentation, I decided that I had team cache failures, which led to significant slowdowns on some critical paths. Therefore, I would like to understand how many bytes are occupied by various methods to direct my efforts to reduce the size of the instruction set.
dshin source
share