所属类别:Linux
文章作者:edwinrong
特别推荐:免费发布信息 承包关键词~~抢爆了!HOT!
# opreport --callgraph 'image:/work/apps/*' warning: /no-vmlinux could not be found.CPU: CPU with timer interrupt, speed 0 MHz (estimated)Profiling through timer interruptsamples % image name app name symbol name-------------------------------------------------------------------------------22004 41.3555 multi-threads multi-threads slow_multiply 22004 100.000 multi-threads multi-threads slow_multiply [self]-------------------------------------------------------------------------------16408 30.8380 libc-2.3.3.so cg __umodsi3 16408 100.000 libc-2.3.3.so cg __umodsi3 [self]-------------------------------------------------------------------------------3686 6.9277 libc-2.3.3.so cg random_r 3686 100.000 libc-2.3.3.so cg random_r [self]-------------------------------------------------------------------------------2651 4.9824 libc-2.3.3.so cg strfry 2651 100.000 libc-2.3.3.so cg strfry [self]-------------------------------------------------------------------------------1662 3.1236 libc-2.3.3.so cg msort_with_tmp 1662 100.000 libc-2.3.3.so cg msort_with_tmp [self]-------------------------------------------------------------------------------1615 3.0353 libc-2.3.3.so cg strcmp 1615 100.000 libc-2.3.3.so cg strcmp [self]-------------------------------------------------------------------------------1116 2.0975 cg cg compare 1116 100.000 cg cg compare [self]-------------------------------------------------------------------------------665 1.2498 libc-2.3.3.so cg Laligned 665 100.000 libc-2.3.3.so cg Laligned [self]-------------------------------------------------------------------------------562 1.0563 libc-2.3.3.so cg _int_malloc 562 100.000 libc-2.3.3.so cg _int_malloc [self]-------------------------------------------------------------------------------503 0.9454 libc-2.3.3.so cg _wordcopy_fwd_aligned 503 100.000 libc-2.3.3.so cg _wordcopy_fwd_aligned [self]-------------------------------------------------------------------------------495 0.9303 no-vmlinux cg (no symbols) 495 100.000 no-vmlinux cg (no symbols) [self]-------------------------------------------------------------------------------429 0.8063 libc-2.3.3.so cg memcpy 429 100.000 libc-2.3.3.so cg memcpy [self]-------------------------------------------------------------------------------371 0.6973 libc-2.3.3.so cg malloc 371 100.000 libc-2.3.3.so cg malloc [self]-------------------------------------------------------------------------------360 0.6766 cg cg .plt 360 100.000 cg cg .plt [self]-------------------------------------------------------------------------------170 0.3195 cg cg repeat 170 100.000 cg cg repeat [self]-------------------------------------------------------------------------------133 0.2500 libc-2.3.3.so cg strdup 133 100.000 libc-2.3.3.so cg strdup [self]-------------------------------------------------------------------------------108 0.2030 multiple multiple slow_multiply 108 100.000 multiple multiple slow_multiply [self]-------------------------------------------------------------------------------49 0.0921 libc-2.3.3.so cg Llastword 49 100.000 libc-2.3.3.so cg Llastword [self]-------------------------------------------------------------------------------41 0.0771 no-vmlinux multi-threads (no symbols) 41 100.000 no-vmlinux multi-threads (no symbols) [self]-------------------------------------------------------------------------------40 0.0752 libc-2.3.3.so cg strlen 40 100.000 libc-2.3.3.so cg strlen [self]-------------------------------------------------------------------------------32 0.0601 multi-threads multi-threads main 32 100.000 multi-threads multi-threads main [self]-------------------------------------------------------------------------------25 0.0470 no-vmlinux multiple (no symbols) 25 100.000 no-vmlinux multiple (no symbols) [self]-------------------------------------------------------------------------------22 0.0413 libc-2.3.3.so cg .plt 22 100.000 libc-2.3.3.so cg .plt [self]-------------------------------------------------------------------------------21 0.0395 multi-threads multi-threads fast_multiply 21 100.000 multi-threads multi-threads fast_multiply [self]-------------------------------------------------------------------------------19 0.0357 multi-threads multi-threads thread_proc 19 100.000 multi-threads multi-threads thread_proc [self]-------------------------------------------------------------------------------13 0.0244 no-vmlinux hello (no symbols) 13 100.000 no-vmlinux hello (no symbols) [self]-------------------------------------------------------------------------------2 0.0038 ld-linux.so.2 multiple _dl_relocate_object 2 100.000 ld-linux.so.2 multiple _dl_relocate_object [self]-------------------------------------------------------------------------------2 0.0038 multiple multiple main 2 100.000 multiple multiple main [self]-------------------------------------------------------------------------------1 0.0019 ld-linux.so.2 cg _dl_relocate_object 1 100.000 ld-linux.so.2 cg _dl_relocate_object [self]-------------------------------------------------------------------------------1 0.0019 ld-linux.so.2 multi-threads do_lookup_versioned 1 100.000 ld-linux.so.2 multi-threads do_lookup_versioned [self]-------------------------------------------------------------------------------1 0.0019 libc-2.3.3.so cg _IO_file_stat 1 100.000 libc-2.3.3.so cg _IO_file_stat [self]-------------------------------------------------------------------------------### opreport --merge=kernel 'image:/work/apps/cg'unknown merge option: kernel# opreport --merge=all 'image:/work/apps/cg'CPU: CPU with timer interrupt, speed 0 MHz (estimated)Profiling through timer interrupt TIMER:0 samples %------------------ 28797 93.0767 libc-2.3.3.so 1646 5.3201 cg 495 1.5999 no-vmlinux 1 0.0032 ld-linux.so.2# opreport 'image:/work/apps/cg'CPU: CPU with timer interrupt, speed 0 MHz (estimated)Profiling through timer interrupt TIMER:0 samples %------------------ 30939 100.000 cg TIMER:0 samples % ------------------ 28797 93.0767 libc-2.3.3.so 1646 5.3201 cg 495 1.5999 no-vmlinux 1 0.0032 ld-linux.so.2### opreport -i 'strcmp' 'image:/work/apps/cg'--exclude-symbols and --include-symbols are meaningless without --symbols# opreport -i 'strcmp' -l 'image:/work/apps/cg'warning: /no-vmlinux could not be found.CPU: CPU with timer interrupt, speed 0 MHz (estimated)Profiling through timer interruptsamples % image name symbol name1615 100.000 libc-2.3.3.so strcmp#### opreport -i 'strcmp,repeat' 'image:/work/apps/cg'--exclude-symbols and --include-symbols are meaningless without --symbols# opreport -i 'strcmp,repeat' -l 'image:/work/apps/cg'warning: /no-vmlinux could not be found.CPU: CPU with timer interrupt, speed 0 MHz (estimated)Profiling through timer interruptsamples % image name symbol name1615 90.4762 libc-2.3.3.so strcmp170 9.5238 cg repeat# opreport -l 'image:/work/apps/cg'warning: /no-vmlinux could not be found.CPU: CPU with timer interrupt, speed 0 MHz (estimated)Profiling through timer interruptsamples % image name symbol name16408 53.0334 libc-2.3.3.so __umodsi33686 11.9138 libc-2.3.3.so random_r2651 8.5685 libc-2.3.3.so strfry1662 5.3719 libc-2.3.3.so msort_with_tmp1615 5.2199 libc-2.3.3.so strcmp1116 3.6071 cg compare665 2.1494 libc-2.3.3.so Laligned562 1.8165 libc-2.3.3.so _int_malloc503 1.6258 libc-2.3.3.so _wordcopy_fwd_aligned495 1.5999 no-vmlinux (no symbols)429 1.3866 libc-2.3.3.so memcpy371 1.1991 libc-2.3.3.so malloc360 1.1636 cg .plt170 0.5495 cg repeat133 0.4299 libc-2.3.3.so strdup49 0.1584 libc-2.3.3.so Llastword40 0.1293 libc-2.3.3.so strlen22 0.0711 libc-2.3.3.so .plt1 0.0032 ld-linux.so.2 _dl_relocate_object1 0.0032 libc-2.3.3.so _IO_file_stat# opannotate --source 'image:/work/apps/cg'warning: /no-vmlinux could not be found./** Command line: opannotate --source image:/work/apps/cg** Interpretation of command line:* Output annotated source file with samples* Output all files** CPU: CPU with timer interrupt, speed 0 MHz (estimated)* Profiling through timer interrupt*/opannotate (warning): unable to open for reading: /home/jollen/ictc/crosstool-0.38/build/arm-9tdmi-linux-gnu/gcc-3.4.1-glibc-2.3.3/gcc-3.4.1/gcc/config/arm/lib1funcs.asm/** Total samples for file : "/home/jollen/ictc/crosstool-0.38/build/arm-9tdmi-linux-gnu/gcc-3.4.1-glibc-2.3.3/gcc-3.4.1/gcc/config/arm/lib1funcs.asm"** 16408 53.0334*//* __umodsi3 total: 16408 53.0334 */opannotate (warning): unable to open for reading: libgcc2.c/** Total samples for file : "libgcc2.c"** 11997 38.7763*/ 11997 38.7763 :/* _dl_relocate_object total: 1 0.0032 *//* msort_with_tmp total: 1662 5.3719 *//* random_r total: 3686 11.9138 *//* _IO_file_stat total: 1 0.0032 *//* _int_malloc total: 562 1.8165 *//* strcmp total: 1615 5.2199 *//* strdup total: 133 0.4299 *//* strlen total: 40 0.1293 *//* Laligned total: 665 2.1494 *//* Llastword total: 49 0.1584 *//* memcpy total: 429 1.3866 *//* _wordcopy_fwd_aligned total: 503 1.6258 *//* strfry total: 2651 8.5685 *//** Total samples for file : "/work/cg.c"** 1286 4.1566*/ :#include :#include :#include : :#define SIZE 500000 : :static int compare(const void *s1, const void *s2) 596 1.9264 :{ /* compare total: 1116 3.6071 */ 372 1.2024 : return strcmp(s1, s2); 148 0.4784 :} : :static void repeat(void) :{ /* repeat total: 170 0.5495 */ : int i; : char *strings[SIZE]; : char str[] = "abcdefghijklmnopqrstuvwxyz"; : 81 0.2618 : for (i = 0; i < SIZE; ++i) { 57 0.1842 : strings[i] = strdup(str); 32 0.1034 : strfry(strings[i]); : } : : qsort(strings, SIZE, sizeof(char *), compare); :} : :int main() :{ : while (1) : repeat(); :} : :## opannotate --source --base-dirs='/work' --search-dirs='work/apps/' 'image:/work/apps/cg'warning: /no-vmlinux could not be found./** Command line: opannotate --source --base-dirs=/work --search-dirs=work/apps/ image:/work/apps/cg** Interpretation of command line:* Output annotated source file with samples* Output all files** CPU: CPU with timer interrupt, speed 0 MHz (estimated)* Profiling through timer interrupt*/opannotate (warning): unable to open for reading: /home/jollen/ictc/crosstool-0.38/build/arm-9tdmi-linux-gnu/gcc-3.4.1-glibc-2.3.3/gcc-3.4.1/gcc/config/arm/lib1funcs.asm/** Total samples for file : "/home/jollen/ictc/crosstool-0.38/build/arm-9tdmi-linux-gnu/gcc-3.4.1-glibc-2.3.3/gcc-3.4.1/gcc/config/arm/lib1funcs.asm"** 16408 53.0334*//* __umodsi3 total: 16408 53.0334 */opannotate (warning): unable to open for reading: libgcc2.c/** Total samples for file : "libgcc2.c"** 11997 38.7763*/ 11997 38.7763 :/* _dl_relocate_object total: 1 0.0032 *//* msort_with_tmp total: 1662 5.3719 *//* random_r total: 3686 11.9138 *//* _IO_file_stat total: 1 0.0032 *//* _int_malloc total: 562 1.8165 *//* strcmp total: 1615 5.2199 *//* strdup total: 133 0.4299 *//* strlen total: 40 0.1293 *//* Laligned total: 665 2.1494 *//* Llastword total: 49 0.1584 *//* memcpy total: 429 1.3866 *//* _wordcopy_fwd_aligned total: 503 1.6258 *//* strfry total: 2651 8.5685 *//** Total samples for file : "/work/cg.c"** 1286 4.1566*/ :#include :#include :#include : :#define SIZE 500000 : :static int compare(const void *s1, const void *s2) 596 1.9264 :{ /* compare total: 1116 3.6071 */ 372 1.2024 : return strcmp(s1, s2); 148 0.4784 :} : :static void repeat(void) :{ /* repeat total: 170 0.5495 */ : int i; : char *strings[SIZE]; : char str[] = "abcdefghijklmnopqrstuvwxyz"; : 81 0.2618 : for (i = 0; i < SIZE; ++i) { 57 0.1842 : strings[i] = strdup(str); 32 0.1034 : strfry(strings[i]); : } : : qsort(strings, SIZE, sizeof(char *), compare); :} : :int main() :{ : while (1) : repeat(); :} : : :}6. References[1] Oprofile User Manual[2] http://oprofile.sourceforge.net/doc/index.html[3] Comsys training slide “Hardware Abstraction Layer”[4] Comsys “White Paper: Incremental Redundancy”
相关信息· 不看不知道 电脑使用陋习TOP10
· 用PHP4访问Oracle815
· C++指针直接调用类成员函数探讨
· ASP的内置对象-Server对象
20262
30862
