2012-11-28 오후 3:36, Shahina Rabbani 쓴 글:
Hi kim and Ritesh,

*kim:*
Thanks for ur reply. But i didnt understand how to profile a particular
function of a process. Can u give the details with example please .


Have you used "perf-top"?
It will be a good reference to you.

This is my perf-top result when i execute SPEC CPU 2006.



PerfTop: 424 irqs/sec kernel: 5.2% exact: 0.0% [1000Hz cycles], (all, 12 CPUs) ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

             samples  pcnt function        DSO
_______ _____ _______________ __________________________________________________________________________________________________________________________________________

105.00 12.7% quantum_toffoli /root/mnmate_3rd/cma_sched/spec2006/benchspec/CPU2006/462.libquantum/run/run_base_ref_amd64-m64-gcc41-nn.0004/libquantum_base.amd64-m64-gcc41-nn 96.00 11.6% quantum_toffoli /root/mnmate_3rd/cma_sched/spec2006/benchspec/CPU2006/462.libquantum/run/run_base_ref_amd64-m64-gcc41-nn.0007/libquantum_base.amd64-m64-gcc41-nn 89.00 10.8% quantum_toffoli /root/mnmate_3rd/cma_sched/spec2006/benchspec/CPU2006/462.libquantum/run/run_base_ref_amd64-m64-gcc41-nn.0005/libquantum_base.amd64-m64-gcc41-nn 84.00 10.2% quantum_toffoli /root/mnmate_3rd/cma_sched/spec2006/benchspec/CPU2006/462.libquantum/run/run_base_ref_amd64-m64-gcc41-nn.0001/libquantum_base.amd64-m64-gcc41-nn 62.00 7.5% quantum_toffoli /root/mnmate_3rd/cma_sched/spec2006/benchspec/CPU2006/462.libquantum/run/run_base_ref_amd64-m64-gcc41-nn.0003/libquantum_base.amd64-m64-gcc41-nn 51.00 6.2% quantum_toffoli /root/mnmate_3rd/cma_sched/spec2006/benchspec/CPU2006/462.libquantum/run/run_base_ref_amd64-m64-gcc41-nn.0002/libquantum_base.amd64-m64-gcc41-nn 45.00 5.4% quantum_toffoli /root/mnmate_3rd/cma_sched/spec2006/benchspec/CPU2006/462.libquantum/run/run_base_ref_amd64-m64-gcc41-nn.0008/libquantum_base.amd64-m64-gcc41-nn 45.00 5.4% quantum_sigma_x /root/mnmate_3rd/cma_sched/spec2006/benchspec/CPU2006/462.libquantum/run/run_base_ref_amd64-m64-gcc41-nn.0005/libquantum_base.amd64-m64-gcc41-nn 42.00 5.1% quantum_toffoli /root/mnmate_3rd/cma_sched/spec2006/benchspec/CPU2006/462.libquantum/run/run_base_ref_amd64-m64-gcc41-nn.0010/libquantum_base.amd64-m64-gcc41-nn 37.00 4.5% quantum_sigma_x /root/mnmate_3rd/cma_sched/spec2006/benchspec/CPU2006/462.libquantum/run/run_base_ref_amd64-m64-gcc41-nn.0001/libquantum_base.amd64-m64-gcc41-nn 28.00 3.4% quantum_cnot /root/mnmate_3rd/cma_sched/spec2006/benchspec/CPU2006/462.libquantum/run/run_base_ref_amd64-m64-gcc41-nn.0007/libquantum_base.amd64-m64-gcc41-nn 26.00 3.1% quantum_cnot /root/mnmate_3rd/cma_sched/spec2006/benchspec/CPU2006/462.libquantum/run/run_base_ref_amd64-m64-gcc41-nn.0004/libquantum_base.amd64-m64-gcc41-nn 20.00 2.4% quantum_sigma_x /root/mnmate_3rd/cma_sched/spec2006/benchspec/CPU2006/462.libquantum/run/run_base_ref_amd64-m64-gcc41-nn.0010/libquantum_base.amd64-m64-gcc41-nn 16.00 1.9% quantum_sigma_x /root/mnmate_3rd/cma_sched/spec2006/benchspec/CPU2006/462.libquantum/run/run_base_ref_amd64-m64-gcc41-nn.0008/libquantum_base.amd64-m64-gcc41-nn 11.00 1.3% quantum_sigma_x /root/mnmate_3rd/cma_sched/spec2006/benchspec/CPU2006/462.libquantum/run/run_base_ref_amd64-m64-gcc41-nn.0002/libquantum_base.amd64-m64-gcc41-nn 10.00 1.2% format_decode [kernel.kallsyms]

8.00 1.0% memcpy /usr/bin/perf_3.0.0-12

7.00 0.8% vsnprintf [kernel.kallsyms]

6.00 0.7% quantum_cnot /root/mnmate_3rd/cma_sched/spec2006/benchspec/CPU2006/462.libquantum/run/run_base_ref_amd64-m64-gcc41-nn.0002/libquantum_base.amd64-m64-gcc41-nn
                5.00  0.6% update_iter     [kernel.kallsyms]




Sorry for the broken format.

But, you can see there is the column called "function".

If your program is compiled with SYMBOLs (gcc, -g option),
Perf reports the event counts corresponding to the symbols.

You can parse "perf-top" result directly.
Or,
there might be other ways if you look into the manual/help of Perf.



*Ritesh* :
@ present i did the experiments on ubuntu intel pc.
Actually these are the questions asked to me when i gave presentation on
perf tool.
Even i have to check the statistics on the board.
I am in the process of  setting up the board to work with the perf tool.
I am facing some problems in the set up. Once i am done with it. then
will check the perf tool statistics and share the results with u for sure.

Keep sharing the info if u got any.

Thanks.
Shahina

On Wed, Nov 28, 2012 at 11:45 AM, Ritesh Harjani
<ritesh.harj...@gmail.com <mailto:ritesh.harj...@gmail.com>> wrote:

    Hi Sahina,

    I am also new to perf. Saw your mail on perf mailing list.
    Can you please tell me the statistics on what extent of profiling
    have you achieved through perf.

    Reason for asking this is that I need to compare between perf and
    some other profiling tool.
    If possible can you please share your results and also on what
    platform you are testing this?

    Thank you
    Ritesh


    On Wed, Nov 28, 2012 at 11:17 AM, Shahina Rabbani
    <shahinarabbani.sh...@gmail.com
    <mailto:shahinarabbani.sh...@gmail.com>> wrote:

        Hi,

        I am a new user of PERF tool. I have few questions to ask about
        the PERF tool.
        Please help me with the answers.

        Q1. Is it possible to use PERF tool on a piece of code? Say i
        have a process P1
        and the process has several functions F1, F2, F3. Is it possible
        to perform
        profilng only on F1 Function ??

        Q2. Say i am using the PERF tool to counts some events depending
        on the clock
        value. If i change the clock value in between, then PERF tool
        can be able to
        understand the situation and generate the event counts according
        to the old and
        new clock values??


        Please Help.

        Thanks,
        Shahina Rabbani

        --
        To unsubscribe from this list: send the line "unsubscribe
        linux-perf-users" in
        the body of a message to majord...@vger.kernel.org
        <mailto:majord...@vger.kernel.org>
        More majordomo info at http://vger.kernel.org/majordomo-info.html



--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to