Re: [mpg123-devel] Unusual CPU usage
Brought to you by:
sobukus
From: Thomas O. <tho...@or...> - 2012-01-06 09:49:27
|
Am Thu, 5 Jan 2012 19:34:06 +0000 schrieb Clive Cooper <cl...@wi...>: > I would appreciate some help with a command line for use with perf. Yeah, I had a hard time with that, too. For a start, try perf record $mpg123_command then perf report This writes the profiling data into the current directory. One can achieve different views with parameter to record / report. On my system, `perf report` opens a TUI interface on a the terminal, but gives plain text when piping the output. Example: shell$ perf record mpg123 -t something.mp3 ... shell$ perf report | cat # Events: 715 cycles # # Overhead Command Shared Object Symbol # ........ ....... ................... ............................... # 41.69% mpg123 libmpg123.so.0.29.6 [.] III_dequantize_sample 24.54% :6136 2b61410cc624 [.] 2b61410cc624 7.70% mpg123 libmpg123.so.0.29.6 [.] INT123_dct64_x86_64 7.23% mpg123 libmpg123.so.0.29.6 [.] INT123_dct36 5.17% mpg123 libmpg123.so.0.29.6 [.] INT123_do_layer3 4.88% mpg123 libmpg123.so.0.29.6 [.] Loop_start_1 3.80% mpg123 libmpg123.so.0.29.6 [.] Loop_start_2 0.85% mpg123 [kernel.kallsyms] [k] copy_page_c 0.68% mpg123 libmpg123.so.0.29.6 [.] III_get_scale_factors_1.isra.1 0.54% mpg123 libmpg123.so.0.29.6 [.] INT123_synth_1to1_stereo_x86_64 0.54% :6136 [kernel.kallsyms] [k] copy_user_generic_string 0.41% :6136 [kernel.kallsyms] [k] generic_file_aio_read 0.27% mpg123 libmpg123.so.0.29.6 [.] dct12 0.27% :6136 [kernel.kallsyms] [k] acpi_os_read_port 0.18% :6136 [kernel.kallsyms] [k] read_hpet 0.14% :6136 [kernel.kallsyms] [k] intel_pmu_disable_all 0.14% mpg123 [kernel.kallsyms] [k] file_read_actor 0.14% :6136 [kernel.kallsyms] [k] fget_light 0.14% mpg123 libmpg123.so.0.29.6 [.] decode_header.part.2 0.14% mpg123 mpg123 [.] play_frame 0.14% mpg123 libmpg123.so.0.29.6 [.] mpg123_decode_frame 0.14% mpg123 [kernel.kallsyms] [k] system_call 0.14% :6136 [kernel.kallsyms] [k] swiotlb_map_sg_attrs 0.13% mpg123 [kernel.kallsyms] [k] __rcu_read_lock 0.01% mpg123 [kernel.kallsyms] [k] __memcpy 0.00% :6136 [kernel.kallsyms] [k] intel_pmu_enable_all # # (For a higher level overview, try: perf report --sort comm,dso) # This is not totally conclusive (you have to guess what 2b61410cc624 is, I'd try the asm code for synth_1to1), but in your case with high ALSA usage, something else than III_dequantize_sample should be on the top. Alrighty then, Thomas. |