What instructions 'instCount' Pin tool counts?

前端 未结 1 1839
[愿得一人]
[愿得一人] 2021-01-27 02:34

I run pintool \'instCount\' on basic C program with empty body within the main function.

int main() {

}

When I run the

相关标签:
1条回答
  • 2021-01-27 03:12

    What's missing is that behind the scenes, a lot of work is done to get you up to the point where the main() function is executed. There is a lot of work that the runtime needs to perform in order to provide the environment as you expect to get it. For example:

    • Libraries must be loaded and initialized.
    • Internal data structures (e.g. the dynamic memory allocator) need to be allocated and initialized.
    • There are various factors in the environment that may change the way the runtime should be have. This needs to be checked and also acted upon.

    The things I listed are just a very partial list of what happens during startup. Similar things occur during shutdown which also add to the instruction count.

    0 讨论(0)
提交回复
热议问题