下载kernel
cd /usr/local/src
wget --no-check-certificate
tar xf
linux-2.6.38.8.tar.xz
cd linux-2.6.38.8/tools/perf
yum -y install elfutils-libelf-devel
yum -y install elfutils-devel newt-devel binutils-devel
yum install zlib-static -y
Makefile:531: No libdw.h found or old libdw.h found or elfutils is older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev
Makefile:587: newt not found, disables TUI support. Please install newt-devel or libnewt-dev
Makefile:675: No bfd.h/libbfd found, install binutils-dev[el]/zlib-static to gain symbol demangling
Makefile:587: newt not found, disables TUI support. Please install newt-devel or libnewt-dev
Makefile:675: No bfd.h/libbfd found, install binutils-dev[el]/zlib-static to gain symbol demangling
* new build flags or prefix
make
make install
==============================================================
ps -ef|grep mysqld
mysqld pid 3006
perf record -p 3006
[root@mhamaster ~]# perf report
Samples: 807 of event 'cycles', Event count (approx.): 135210609
6.50% mysqld mysqld [.] buf_calc_page_new_checksum(unsigned char const*)
5.03% mysqld mysqld [.] sync_array_print_long_waits(unsigned long*, void const**)
3.92% mysqld mysqld [.] MYSQLparse(THD*)
3.55% mysqld libc-2.12.so [.] __strcmp_sse42
2.27% mysqld mysqld [.] my_strnncollsp_utf8
2.17% mysqld mysqld [.] page_cur_insert_rec_low(unsigned char*, dict_index_t*, unsigned char const*, unsigned long*, mtr_t*)
2.13% mysqld libc-2.12.so [.] memcpy
1.59% mysqld [vsyscall] [.] 0x0000000000000140
1.55% mysqld [kernel.kallsyms] [k] futex_wake
1.52% mysqld mysqld [.] Field_blob::char_length()
1.41% mysqld mysqld [.] _ZL8get_textP16Lex_input_streamii.clone.0
1.17% mysqld [kernel.kallsyms] [k] _spin_lock_irqsave
0.99% mysqld [kernel.kallsyms] [k] _spin_lock
0.94% mysqld mysqld [.] Item::check_cols(unsigned int)
0.90% mysqld mysqld [.] Item_field::val_str(String*)
0.90% mysqld mysqld [.] TaoCrypt::HASHwithTransform::HASHwithTransform(unsigned int, unsigned int)
阅读(1124) | 评论(0) | 转发(0) |