The executable binary should incorporate all other libraries (MSVCRT90.dll, for example) when linking.
However only executed code area will be sampled. You said "And the result shows DTLB_MISS is not zero while the other field is zero(the function is not been executed but loaded )." - that is not true, the function should be executed then sampled! Samples of corresponding lines could be zeroforsome fieldbut other field is non-zero, sometime.
Iam pauzzlingwhy"comment-out" line was displayed on DTLS_MISScolumn as non-zero?Was it caused by the compiler that youused some optimizedoptions?
Iam very interested intest case. Could you please provide it?