All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
Cc: Wang Nan <wangnan0@huawei.com>,
	linux-kernel@vger.kernel.org, lizefan@huawei.com,
	pi3orama@163.com
Subject: Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture
Date: Wed, 14 Sep 2016 10:52:13 -0300	[thread overview]
Message-ID: <20160914135213.GA9849@kernel.org> (raw)
In-Reply-To: <20160914092810.GA21691@naverao1-tp.localdomain>

Em Wed, Sep 14, 2016 at 02:58:10PM +0530, Naveen N. Rao escreveu:
> On 2016/09/12 06:15PM, Arnaldo Carvalho de Melo wrote:
> > Em Mon, Sep 12, 2016 at 04:07:42PM -0300, Arnaldo Carvalho de Melo escreveu:
> > So, please take a look at my perf/core branch, I applied 1/3 and 3/3,
> > but took a different path for 2/3, now it builds for all systems I have
> > containers for:
 
> This still fails for me on ppc64. Perhaps we should guard 
> P_MMAP_FLAG(32BIT) and potentially others with a #ifdef, which was 
> earlier reverted by commit 256763b0 ("perf trace beauty mmap: Add more 
> conditional defines")?

Humm, yeah, we have to find a way to make it clear that some flags are
not present in all arches, I'll think about the solution Wang came up
with, i.e. having it defined to zero on arches where it is not
supported, which at first sounds ugly :-\

One thing related to this, but for future work, is to be able to support
doing a ' perf trace record'  on x86_64 and then doing a 'perf trace -i
perf.data' with the resulting file, i.e. cross-platform syscall arg
beautifying, i.e. a cross-arch strace.

Right now we use audit lib to at least map the syscall ids using, IIRC,
the header env stuff, but we need to go to the syscall args as well.
Future work, sure.

And yeah, I'll try and cross-build audit-lib for my powerpc cross build
containers, so that I can catch this bug before applying these patches
and make sure things like this get caught in the future.

- Arnaldo
 
> - Naveen
> 
> ---
> In file included from builtin-trace.c:560:0:
> trace/beauty/mmap.c: In function ‘syscall_arg__scnprintf_mmap_flags’:
> trace/beauty/mmap.c:38:14: error: ‘MAP_32BIT’ undeclared (first use in this function)
>   if (flags & MAP_##n) { \
>               ^
> trace/beauty/mmap.c:45:2: note: in expansion of macro ‘P_MMAP_FLAG’
>   P_MMAP_FLAG(32BIT);
>   ^
> trace/beauty/mmap.c:38:14: note: each undeclared identifier is reported only once for each function it appears in
>   if (flags & MAP_##n) { \
>               ^
> trace/beauty/mmap.c:45:2: note: in expansion of macro ‘P_MMAP_FLAG’
>   P_MMAP_FLAG(32BIT);
>   ^
>   CC       bench/mem-functions.o
> mv: cannot stat ‘./.builtin-trace.o.tmp’: No such file or directory
> make[2]: *** [builtin-trace.o] Error 1
> make[2]: *** Waiting for unfinished jobs....

  parent reply	other threads:[~2016-09-14 13:52 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-12 12:54 [PATCH 0/3] perf: Fix mmap related macros Wang Nan
2016-09-12 12:54 ` [PATCH 1/3] tools include: Add uapi mman.h for each architecture Wang Nan
2016-09-12 19:07   ` Arnaldo Carvalho de Melo
2016-09-12 21:15     ` Arnaldo Carvalho de Melo
2016-09-13  6:36       ` Wangnan (F)
2016-09-14  9:28       ` Naveen N. Rao
2016-09-14  9:36         ` Wangnan (F)
2016-09-14 10:00           ` Naveen N. Rao
2016-09-14 10:23             ` Wangnan (F)
2016-09-14 10:46               ` Naveen N. Rao
2016-09-14 10:49                 ` Wangnan (F)
2016-09-14 13:52         ` Arnaldo Carvalho de Melo [this message]
2016-09-14 16:34           ` Naveen N. Rao
2016-09-14 17:00             ` Arnaldo Carvalho de Melo
2016-09-15 14:47               ` Naveen N. Rao
2016-09-20 21:37   ` [tip:perf/core] " tip-bot for Wang Nan
2016-09-12 12:54 ` [PATCH 2/3] tools include: Introduce bits/mman.h Wang Nan
2016-09-12 12:54 ` [PATCH 3/3] perf build: Compare mman.h related headers againest kernel Wang Nan
2016-09-20 21:39   ` [tip:perf/core] perf build: Compare mman.h related headers against kernel originals tip-bot for Wang Nan

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=20160914135213.GA9849@kernel.org \
    --to=acme@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    --cc=pi3orama@163.com \
    --cc=wangnan0@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.