Poring perf to android

This topic contains 2 replies, has 2 voices, and was last updated by  maosuyun2009 4 years, 2 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #31437

    When i run “perf record -g -p pid”
    in android.
    I run “perf report -g –stdio”,There is no callstack
    I compiled program with -fno-omit-frame-pointer, Still can’t get callstack by perf

    #37888

    dczhu
    Member

    What process are you recording perf data against? Please try the pid of a browser process.

    What is the outcome of “perf report -g –stdio”? Can you paste it here?

    What are the version of your running kernel and the version of the perf tool (perf –version)?

    The following is what I got for the Android stock browser with perf/kernel 3.0.8 (only kernel callchains, if you want userspace stuff, check out this patch set http://www.linux-mips.org/archives/linux-mips/2013-05/msg00122.html ):

    # cat perf.txt
    # Events: 8K cycles
    #
    # Overhead Command Shared Object Symbol
    # ........ ............... ..................... ...........................................................
    #
    26.10% WebViewCoreThre libwebcore.so [.] 0x167bc8
    8.62% WebViewCoreThre libdvm_turbo.so [.] 0xd013c
    4.13% WebViewCoreThre libdvm_turbo.so [.] 0x4aa4c
    3.43% WebViewCoreThre libdvm_turbo.so [.] dvmChangeStatus
    3.10% WebViewCoreThre libdvm_turbo.so [.] 0x80d80
    2.69% WebViewCoreThre [kernel.kallsyms] [k] handle_sys
    |
    --- handle_sys

    1.75% WebViewCoreThre libdvm_turbo.so [.] _ftext
    1.35% WebViewCoreThre libc.so [.] pthread_mutex_lock
    1.26% WebViewCoreThre libdvm_turbo.so [.] dvmAsmInstructionStart
    1.21% WebViewCoreThre [kernel.kallsyms] [k] ktime_get_ts
    |
    --- ktime_get_ts
    |
    |--82.30%-- posix_ktime_get_ts
    | sys_clock_gettime
    | stack_done
    |
    |--11.80%-- sys_epoll_wait
    | stack_done
    |
    --5.90%-- select_estimate_accuracy
    sys_epoll_wait
    stack_done

    1.21% WebViewCoreThre [kernel.kallsyms] [k] _raw_spin_unlock_irqrestore
    |
    --- _raw_spin_unlock_irqrestore
    |
    |--54.32%-- __hrtimer_start_range_ns
    | hrtimer_start_range_ns
    | schedule_hrtimeout_range_clock
    | sys_epoll_wait
    | stack_done
    |
    --45.68%-- sys_epoll_wait
    stack_done

    1.16% WebViewCoreThre libdvm_turbo.so [.] dvmDdacReturnFromMethod
    1.14% WebViewCoreThre [kernel.kallsyms] [k] gic_hpt_read
    |
    --- gic_hpt_read
    |
    |--52.48%-- getnstimeofday
    | do_gettimeofday
    | sys_gettimeofday
    | stack_done
    |
    --47.52%-- ktime_get_ts
    |
    |--80.12%-- posix_ktime_get_ts
    | sys_clock_gettime
    | stack_done
    |
    |--11.04%-- sys_epoll_wait
    | stack_done
    |
    --8.83%-- select_estimate_accuracy
    sys_epoll_wait
    stack_done

    1.13% WebViewCoreThre libandroid_runtime.so [.] 0x68c50
    1.10% WebViewCoreThre libc.so [.] pthread_mutex_unlock
    ...
    ...
    ...

    #37889

    Thank you, The version of kernel and perf just same as your, I can get kernel callchain, I want get userspace stuff, The patch seemingly for Linux, How can i get this patch in Android and modify the Android.mk

Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.