MCPcopy Create free account
hub / github.com/apache/thrift / profile_write_pprof

Function profile_write_pprof

lib/cpp/src/thrift/VirtualProfiling.cpp:406–421  ·  view source on GitHub ↗

* Write the recorded profiling information as pprof files. * * This writes the information using the Google CPU profiler binary data * format, so it can be analyzed with pprof. Note that information about the * protocol/transport data types cannot be stored in this file format. * * See http://code.google.com/p/google-perftools/ for more details. * * @param gen_calls_f The information

Source from the content-addressed store, hash-verified

404 * profile_virtual_call() will be written to this file.
405 */
406void profile_write_pprof(FILE* gen_calls_f, FILE* virtual_calls_f) {
407 typedef std::vector<std::pair<Key, size_t> > BacktraceVector;
408
409 CountGreater is_greater;
410
411 // Grab both locks for the duration of the print operation,
412 // to ensure the output is a consistent snapshot of a single point in time
413 Guard generic_calls_guard(generic_calls_mutex);
414 Guard virtual_calls_guard(virtual_calls_mutex);
415
416 // write the info from generic_calls
417 profile_write_pprof_file(gen_calls_f, generic_calls);
418
419 // write the info from virtual_calls
420 profile_write_pprof_file(virtual_calls_f, virtual_calls);
421}
422}
423} // apache::thrift
424

Callers

nothing calls this directly

Calls 1

profile_write_pprof_fileFunction · 0.85

Tested by

no test coverage detected