linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Matthieu CASTET <matthieu.castet@parrot.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: perf on biarch
Date: Thu, 21 Aug 2014 09:10:24 -0600	[thread overview]
Message-ID: <53F60BE0.5050509@gmail.com> (raw)
In-Reply-To: <20140818111656.40ff6ae7@parrot.com>

On 8/18/14, 3:16 AM, Matthieu CASTET wrote:
> Le Fri, 8 Aug 2014 13:50:52 -0600,
> David Ahern <dsahern@gmail.com> a écrit :
>
>> On 8/8/14, 10:40 AM, Matthieu CASTET wrote:
>>> Hi,
>>>
>>> I have a 64 bits kernel running with 32 bits binaries.
>>> If I run 32 bits perf on this 64 bits kernel 3.14, I got weird result :
>>>
>>> - perf trace doesn't work [1]
>>
>> I have patches that fix that:
>>       git clone https://github.com/dsahern/linux.git
>>       git checkout perf-full-monty
>>
>> And if autodetection fails you can manually force it with -M x86.
>>
> Thanks david.
> It is better, but it seems there are problem with argument parsing.
>
> For example for
> "mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
> 0) = 0xf77e2000"
> I got :
> - 2.847 ( 0.004 ms): mmap2(arg0: 0, arg1: 0, arg2: 4096, arg3: 0, arg4:
> 3, arg5: 0         ) = -143273984
>
>
> Note the 4096 position. Running perf trace on a 32 bits kernel give
> 4096 at arg1.

What kernel version? And are you running my perf command or did you 
extract the relevant patches?

Using a mixed system here:

# uname -a
Linux switch 3.4.10 #1 SMP Wed Jul 30 13:10:46 PDT 2014 x86_64 GNU/Linux

# file /bin/ls
/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), 
dynamically linked (uses shared libs), for GNU/Linux 2.6.34, stripped

And comparing 'strace ls':

mmap2(0x41217000, 33356, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 
3, 0) = 0x41217000

to 'perf trace ls':

1.239 ( 0.015 ms): mmap2(arg0: 1092710400, arg1: 33356, arg2: 5, arg3: 
2050, arg4: 3, arg5: 0) = 1092710400

I am seeing a consistent output between strace and perf-trace for 32-bit 
app on 64-bit kernel -- though perf-trace does need the pretty print for 
mmap2.

David

      reply	other threads:[~2014-08-21 15:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-08 16:40 perf on biarch Matthieu CASTET
2014-08-08 19:50 ` David Ahern
2014-08-18  9:16   ` Matthieu CASTET
2014-08-21 15:10     ` David Ahern [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53F60BE0.5050509@gmail.com \
    --to=dsahern@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthieu.castet@parrot.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).