* 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
| 404 | * profile_virtual_call() will be written to this file. |
| 405 | */ |
| 406 | void 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 |
nothing calls this directly
no test coverage detected