Interpreting the output of perf.data file using perf report

Viewed 38

My C++ application was consuming a lot of CPU cycles. So I have profiled my application using the Linux profiler.The output of the profiler (perf.data) file was generated, and I have run perf report

The report is given below.

# To display the perf.data header info, please use --header/--header-only options.
#
#
# Total Lost Samples: 0
#
# Samples: 43K of event 'cpu-clock:uhH'
# Event count (approx.): 10966500000
#
# Overhead  Command          Shared Object              Symbol                                                                                                                                                                              
# ........  ...............  .........................  ....................................................................................................................................................................................
#

59.19%  ZManager  libc-2.23.so        [.] __mcount_internal
14.15%  ZManager  libc-2.23.so        [.] _mcount
 1.41%  ZManager  ZManager            [.] std::vector<unsigned int, std::allocator<unsigned int> >::~vector
 1.17%  ZManager  ZManager            [.] std::vector<unsigned int, std::allocator<unsigned int> >::size
 1.16%  ZManager  ZManager            [.] std::vector<unsigned int, std::allocator<unsigned int> >::vector
 0.46%  ZManager  ZManager            [.] std::_Vector_base<unsigned int, std::allocator<unsigned int> >::_Vector_impl::_Vector_impl
 0.45%  ZManager  ZManager            [.] std::__copy_move_a2<false, __gnu_cxx::__normal_iterator<unsigned int const*, std::vector<unsigned int, std::allocator<unsigned int> > >, unsigned int*>
 0.40%  ZManager  libpthread-2.23.so         [.] pthread_mutex_lock
 0.39%  ZManager  ZManager            [.] std::__miter_base<__gnu_cxx::__normal_iterator<unsigned int const*, std::vector<unsigned int, std::allocator<unsigned int> > > >
 0.38%  ZManager  libc-2.23.so               [.] _int_malloc
 0.36%  ZManager  ZManager            [.] std::__niter_base<__gnu_cxx::__normal_iterator<unsigned int const*, std::vector<unsigned int, std::allocator<unsigned int> > > >
 0.34%  ZManager  ZManager            [.] std::allocator<unsigned int>::allocator
 0.34%  ZManager  ZManager            [.] std::allocator<unsigned int>::~allocator

From the above it is clear that majority of the CPU is consumed by some instruction in libc (which my program is calling)

It is shown as

59.19%  ZManager  libc-2.23.so        [.] __mcount_internal
14.15%  ZManager  libc-2.23.so        [.] _mcount

Does anyone know what __mcount_internal and _mcount means?

0 Answers
Related