Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1234799

Re: [PATCH] perf record: Limit --intr-regs to platforms supporting PERF_REGS

From "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [PATCH] perf record: Limit --intr-regs to platforms supporting PERF_REGS
Date 2015-09-29 10:10 +0200
Message-ID <qdY94-Eb-19@gated-at.bofh.it> (permalink)
References (1 earlier) <qcehY-3um-9@gated-at.bofh.it> <qcgMN-7bv-9@gated-at.bofh.it> <qciEW-1qz-9@gated-at.bofh.it> <qdVNT-5Dg-11@gated-at.bofh.it> <qdX3k-7kc-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 2015/09/29 08:53AM, Jiri Olsa wrote:
> On Tue, Sep 29, 2015 at 11:06:17AM +0530, Naveen N. Rao wrote:
> > On 2015/09/24 10:15PM, Naveen N Rao wrote:
> > > On 2015/09/24 08:32AM, Stephane Eranian wrote:
> > > > On Thu, Sep 24, 2015 at 5:57 AM, Jiri Olsa <jolsa@redhat.com> wrote:
> > > > >
> > > > > On Thu, Sep 24, 2015 at 05:41:58PM +0530, Naveen N. Rao wrote:
> > > > > > perf build currently fails on powerpc:
> > > > > >
> > > > > >   LINK     perf
> > > > > > libperf.a(libperf-in.o):(.toc+0x120): undefined reference to
> > > > > > `sample_reg_masks'
> > > > > > libperf.a(libperf-in.o):(.toc+0x130): undefined reference to
> > > > > > `sample_reg_masks'
> > > > > > collect2: error: ld returned 1 exit status
> > > > > > make[1]: *** [perf] Error 1
> > > > > > make: *** [all] Error 2
> > > > > >
> > > > > > This is due to parse-regs-options.c using sample_reg_masks, which is
> > > > > > defined only with CONFIG_PERF_REGS.
> > > > > >
> > > > > > In addition, perf record -I is only useful if the arch supports
> > > > > > PERF_REGS. Hence, let's expose -I conditionally.
> > > > > >
> > > > > > Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
> > > > >
> > > > > hum, I wonder why we have sample_reg_masks defined as weak in util/perf_regs.c
> > > > > which is also built only via CONFIG_PERF_REGS
> > > > >
> > > > > I wonder we could get rid of the weak definition via attached patch, Stephane?
> > > > >
> > > > But the whole point of having it weak is to avoid this error scenario
> > > > on any arch without support
> > > > and avoid ugly #ifdef HAVE_ in generic files.
> > > > 
> > > > if perf_regs.c is compiled on PPC, then why do we get the undefined?
> > > 
> > > As Jiri Olsa pointed out, powerpc and many other architectures don't 
> > > (yet) have support for perf regs.
> > > 
> > > But, the larger reason to introduce #ifdef is so the user doesn't see 
> > > options (s)he can't use on a specific architecture, along the same lines 
> > > as builtin-probe.c
> > 
> > Stephane, Arnaldo,
> > Suka has also posted a fix for this with a different approach [1]. Can 
> > you please ack/pull one of these versions? Building perf is broken on 
> > v4.3-rc due to this.
> 
> I did not get any answer for additional comments I made to the patch
> (couldnt get marc.info working, sending the patch again)

Hi Jiri,
I concur with the changes you proposed to my patch here (getting rid of 
the weak variant):
http://article.gmane.org/gmane.linux.kernel/2046108

I am aware of the other approach you posted (and the one attached 
below). When I said "please ack/pull one of these versions", I meant one 
of: your version, Suka's and mine.

> 
> > 
> > [1] http://article.gmane.org/gmane.linux.kernel/2046370
> 
> I dont have this last version, which seems to have other changes
> and patch in above link looks mangled, could you please repost it?

Can you please check the raw version:
http://article.gmane.org/gmane.linux.kernel/2046370/raw


Thanks,
Naveen

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] perf record: Limit --intr-regs to platforms supporting PERF_REGS "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2015-09-24 14:20 +0200
  Re: [PATCH] perf record: Limit --intr-regs to platforms supporting  PERF_REGS Jiri Olsa <jolsa@redhat.com> - 2015-09-24 15:00 +0200
    Re: [PATCH] perf record: Limit --intr-regs to platforms supporting PERF_REGS Stephane Eranian <eranian@google.com> - 2015-09-24 17:40 +0200
      Re: [PATCH] perf record: Limit --intr-regs to platforms supporting  PERF_REGS Jiri Olsa <jolsa@redhat.com> - 2015-09-24 18:10 +0200
      Re: [PATCH] perf record: Limit --intr-regs to platforms supporting  PERF_REGS "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2015-09-24 19:40 +0200
        Re: [PATCH] perf record: Limit --intr-regs to platforms supporting  PERF_REGS "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2015-09-29 07:40 +0200
          Re: [PATCH] perf record: Limit --intr-regs to platforms supporting  PERF_REGS Jiri Olsa <jolsa@redhat.com> - 2015-09-29 09:00 +0200
            Re: [PATCH] perf record: Limit --intr-regs to platforms supporting  PERF_REGS "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2015-09-29 10:10 +0200
              Re: [PATCH] perf record: Limit --intr-regs to platforms supporting  PERF_REGS Jiri Olsa <jolsa@redhat.com> - 2015-09-29 12:50 +0200
                Re: [PATCH] perf record: Limit --intr-regs to platforms supporting  PERF_REGS "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2015-09-29 18:40 +0200
                Re: [PATCH] perf record: Limit --intr-regs to platforms supporting  PERF_REGS Jiri Olsa <jolsa@redhat.com> - 2015-09-29 19:20 +0200
                Re: [PATCH] perf record: Limit --intr-regs to platforms supporting  PERF_REGS Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> - 2015-09-29 22:10 +0200
                Re: [PATCH] perf record: Limit --intr-regs to platforms supporting  PERF_REGS Jiri Olsa <jolsa@redhat.com> - 2015-09-29 22:40 +0200

csiph-web