linux-mips
[Top] [All Lists]

Re: [PATCH v2 4/4] MIPS: perf: Add support for 64-bit perf counters.

To: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>
Subject: Re: [PATCH v2 4/4] MIPS: perf: Add support for 64-bit perf counters.
From: David Daney <ddaney@caviumnetworks.com>
Date: Tue, 25 Jan 2011 16:20:14 -0800
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org, Peter Zijlstra <a.p.zijlstra@chello.nl>, Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@elte.hu>, Arnaldo Carvalho de Melo <acme@redhat.com>
In-reply-to: <AANLkTimFnBJeU7BT6ARM=+KSod0UB-XFZTxgWWh1N=i2@mail.gmail.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1295650776-28444-1-git-send-email-ddaney@caviumnetworks.com> <1295650776-28444-5-git-send-email-ddaney@caviumnetworks.com> <AANLkTimFnBJeU7BT6ARM=+KSod0UB-XFZTxgWWh1N=i2@mail.gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Fedora/3.0.10-1.fc12 Thunderbird/3.0.10
On 01/24/2011 07:42 PM, Deng-Cheng Zhu wrote:
Hi, David


This version does fix the problem with 'perf stat'. However, when working
with 'perf record', the following happened:

-sh-4.0# perf record -f -e cycles -e instructions -e branches \
-e branch-misses -e r12 find / -name "*sys*">/dev/null
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.001 MB perf.data (~53 samples) ]


I get the same thing. What happens if you supply either '-c xxx' or '-f xxx'?

I get:octeon:~/linux/tools/perf# ./perf record -e cycles /bin/ls -l /
total 100
drwxr-xr-x   2 root root  4096 2010-11-12 11:39 bin
[...]
drwxr-xr-x  13 root root  4096 2007-05-25 12:28 var
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.002 MB perf.data (~82 samples) ]

Almost no samples as you got.

But if I do:

octeon:~/linux/tools/perf# ./perf record -F 100000 -e cycles /bin/ls -l /
total 100
drwxr-xr-x   2 root root  4096 2010-11-12 11:39 bin
[...]
drwxr-xr-x  13 root root  4096 2007-05-25 12:28 var
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.404 MB perf.data (~17653 samples) ]

Look many more samples!

The question is, what is it supposed to do?

If you can get a reasonable number of samples out if you supply -c or
-F, then I would argue that it is working and the default settings for
-F are not a good fit for your test case.

I have slightly changed the patch. You could try the attached version instead and tell me the results.


David Daney


Attachment: mips-perf-64bit.patch
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>