MICA
MICA copied to clipboard
MICA counters for specific code block
Is it possible to make MICA/PIN to measure between A and B?
In the following example what would I have to do (in terms of code instrumentation or parameters passed to MICA) so that the MICA counters would only be incremented for CODE BLOCK 2?
int main() {
// CODE BLOCK 1 // start measuring // CODE BLOCK 2 // end measurement // CODE BLOCK 3
}
Last time I used PIN was ages ago, but I think you can selectively enable instrumentation by injecting some PIN methods... @amirjamez?
Hi,
Sorry for the sluggish reply.
I haven't done this myself, but i believe you can use PIN's instrumentation features.
How about this? http://reverseengineering.stackexchange.com/questions/8884/how-can-i-remove-a-bbl-instrumentation-call-at-a-specific-address-in-pin#
Nevertheless, you should track the number of times the instrumentation is done, depending on the number of invocation of the block (calls) it has and I believe it might be a little noisy. As another workaround, you can make each of those blocks an independent executable object and use the native MICA feature to instrument the binary at run-time.
Hope either of them work.
-Amir
On Wed, Nov 16, 2016 at 7:15 PM, Kenneth Hoste [email protected] wrote:
Last time I used PIN was ages ago, but I think you can selectively enable instrumentation by injecting some PIN methods... @amirjamez https://github.com/amirjamez?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/boegel/MICA/issues/7#issuecomment-260979978, or mute the thread https://github.com/notifications/unsubscribe-auth/AIglHsRGpx-9OJ2T4aPXTKnJG8XrX4QRks5q-yUNgaJpZM4K0AZl .