Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-13683

all threads must call ProfilerRegisterThread() for gperftools

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.6.0
    • Fix Version/s: None
    • Component/s: Diagnostics
    • Labels:
      None
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      see https://code.google.com/p/gperftools/issues/detail?id=335 where gperftool maintainers admit this is probably needed and the thread at https://groups.google.com/forum/#!topic/google-perftools/gEpE7_AdibI. This is a regression in gperftools as it wasn't needed in the near past. But many, many years ago it was needed when I was profiling mysqld. I added the call to ProfilerRegisterThread to to handleIncomingMsg.

      In this case I compiled the server with --user-cpu-profiler, called _cpuProfilerStart, ran a workload, called _cpuProfilerStop

      Show
      see https://code.google.com/p/gperftools/issues/detail?id=335 where gperftool maintainers admit this is probably needed and the thread at https://groups.google.com/forum/#!topic/google-perftools/gEpE7_AdibI . This is a regression in gperftools as it wasn't needed in the near past. But many, many years ago it was needed when I was profiling mysqld. I added the call to ProfilerRegisterThread to to handleIncomingMsg. In this case I compiled the server with --user-cpu-profiler, called _cpuProfilerStart, ran a workload, called _cpuProfilerStop

      Description

      To get CPU profiling from gperftools on recent Linux systems/kernels, all threads should call ProfilerRegisterThread. This issue is forked from https://jira.mongodb.org/browse/SERVER-6628

      Without adding the calls to ProfilerRegisterThread the gperftools profiler output file has nothing useful...
      pprof --pdf /path/to/mongod /path/to/profiler/output
      Using local file mongodb-src-r2.6.0/build/linux2/norm/mongo/mongod.
      Using local file prof2.260.
      No nodes to print

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: