Makefile profiling

后端 未结 7 718
温柔的废话
温柔的废话 2020-12-24 13:23

So I have this Makefile based build system that my users feel is working too slowly. For the sake of this question lets define performance as the time it takes make to figur

相关标签:
7条回答
  • 2020-12-24 14:19

    This is work, but I would get the source of Make, build it with debugging information, and run it under gdb and randomly-pause it during the time you're waiting for it. That would show what it's doing and why. It would probably be necessary to look at more than the call stack - to look at the internal data structure as well, because Make is an interpreter. Since Make calls itself as a subordinate application, that can make the job harder. I would have to figure out how to debug a subordinate call.

    Since it is so slow, one (1) sample has a very good probability of showing you the problem. If you want more certainty, do it several times.

    And don't worry about optimization level - the bottlenecks are probably much bigger than that.

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