Add scons flag which enables -pg

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Build, Performance
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Gprof is a performance profiler. To enable it, you must pass the -pg flag to the compiler. Binaries so compiled will dump performance counters to 'gmon.out' on process exit. However, mongod does not exit normally, which prevents 'gmon.out' from being generated. To properly flush the counters, we must declare an external function called "_mcleanup()" and call it during quickExit. This is a pattern used for coverage analysis, where we manually declare and call GCov's __gcov_flush function.

       

      We should add a scons flag which passes -pg to the compiler, and enables a preprocessor flag which enables the declaration and call of _mcleanup.

            Assignee:
            DO NOT USE - Backlog - Dev Tools
            Reporter:
            Spencer Jackson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: