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


Groups > linux.kernel > #1314818

RE: [PATCH perf 3/4] perf tools: Fix unused variables: x86_{32,64}_regoffset_table

Path csiph.com!news.mixmin.net!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod
From 平松雅巳 / HIRAMATU,MASAMI <masami.hiramatsu.pt@hitachi.com>
Newsgroups linux.kernel
Subject RE: [PATCH perf 3/4] perf tools: Fix unused variables: x86_{32,64}_regoffset_table
Date Fri, 22 Jan 2016 09:10:02 +0100
Message-ID <qTEX8-1ic-9@gated-at.bofh.it> (permalink)
References <qSMam-56x-3@gated-at.bofh.it> <qSMam-56x-15@gated-at.bofh.it> <qT1sK-7gA-3@gated-at.bofh.it> <qTfm1-5Y-7@gated-at.bofh.it> <qTCVk-845-5@gated-at.bofh.it> <qTDom-5p-13@gated-at.bofh.it>
X-Original-To "'Wangnan (F)'" <wangnan0@huawei.com>, Arnaldo Carvalho de Melo <acme@kernel.org>, Ben Hutchings <ben@decadent.org.uk>, He Kuang <hekuang@huawei.com>
Thread-Topic [PATCH perf 3/4] perf tools: Fix unused variables: x86_{32,64}_regoffset_table
Thread-Index AQHRU4rY5coznL13SEKlLSIkpbzlJJ8EzngAgAI5w7D//3OGAIAAmc/w
Accept-Language ja-JP, en-US
Content-Language ja-JP
X-Originating-IP [10.198.219.44]
Content-Type text/plain; charset="utf-8"
Content-Transfer-Encoding base64
MIME-Version 1.0
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 20
Organization linux.* mail to news gateway
X-Original-Cc Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, Jiri Olsa <jolsa@kernel.org>, Kaixu Xia <xiakaixu@huawei.com>, Zefan Li <lizefan@huawei.com>
X-Original-Date Fri, 22 Jan 2016 07:59:53 +0000
X-Original-Message-ID <50399556C9727B4D88A595C8584AAB37B4DBA2B7@GSjpTKYDCembx31.service.hitachi.net>
X-Original-References <20160119213213.GB2637@decadent.org.uk> <20160119213306.GE2637@decadent.org.uk> <20160120135924.GR27085@kernel.org> <56A061D8.80502@huawei.com> <50399556C9727B4D88A595C8584AAB37B4DBA0F8@GSjpTKYDCembx31.service.hitachi.net> <56A1C9F4.7070000@huawei.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1314818

Show key headers only | View raw


>From: Wangnan (F) [mailto:wangnan0@huawei.com]
>On 2016/1/22 13:56, 平松雅巳 / HIRAMATU,MASAMI wrote:
>>> From: Wangnan (F) [mailto:wangnan0@huawei.com]
>>> I think this problem is not introduced by my patch. In fact
>>> there's a fundamental problem in get_arch_regstr() that it is
>>> impossible to switch sub ISA.
>> Right, but I guess this can fixed by switching %sp (for x86-64)
>> and +0(%sp) (for x86-32) instead of $stack.
>>
>
>It may not work.
>
>No matter how we change regoffset_table, when get_arch_regstr()
>get a register number 4, how can it know whether we are looking
>for x86_32 register and return $stack or return %si for x86_64?

I think we can also use elf header to get the ISA of the
target binary.

>The fundamental problem is: we need a way to map dwarf's register
>number to register names so uprobe know which register we are
>looking for, but the API we designed for this can't distinguish
>the sub ISAs dwarf are using.

As I said, we can read the elf header and get the Class or Machine
and switch the table according to it. Can't it?

Thanks,

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


Thread

[PATCH perf 0/4] Build fixes for gcc 6 Ben Hutchings <ben@decadent.org.uk> - 2016-01-19 22:40 +0100
  [PATCH perf 4/4] perf tests: Delete mis-indented dead code that  causes build failure with gcc 6 Ben Hutchings <ben@decadent.org.uk> - 2016-01-19 22:40 +0100
  [PATCH perf 3/4] perf tools: Fix unused variables:  x86_{32,64}_regoffset_table Ben Hutchings <ben@decadent.org.uk> - 2016-01-19 22:40 +0100
    Re: [PATCH perf 3/4] perf tools: Fix unused variables:  x86_{32,64}_regoffset_table Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-20 15:00 +0100
      Re: [PATCH perf 3/4] perf tools: Fix unused variables: x86_{32,64}_regoffset_table "Wangnan (F)" <wangnan0@huawei.com> - 2016-01-21 05:50 +0100
        Re: [PATCH perf 3/4] perf tools: Fix unused variables:  x86_{32,64}_regoffset_table Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-21 16:40 +0100
          Re: [PATCH perf 3/4] perf tools: Fix unused variables:  x86_{32,64}_regoffset_table Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-21 16:50 +0100
            Re: [PATCH perf 3/4] perf tools: Fix unused variables: x86_{32,64}_regoffset_table "Wangnan (F)" <wangnan0@huawei.com> - 2016-01-22 02:40 +0100
        RE: [PATCH perf 3/4] perf tools: Fix unused variables:  x86_{32,64}_regoffset_table 平松雅巳 / HIRAMATU,MASAMI   <masami.hiramatsu.pt@hitachi.com> - 2016-01-22 07:00 +0100
          Re: [PATCH perf 3/4] perf tools: Fix unused variables: x86_{32,64}_regoffset_table "Wangnan (F)" <wangnan0@huawei.com> - 2016-01-22 07:30 +0100
            RE: [PATCH perf 3/4] perf tools: Fix unused variables:  x86_{32,64}_regoffset_table 平松雅巳 / HIRAMATU,MASAMI   <masami.hiramatsu.pt@hitachi.com> - 2016-01-22 09:10 +0100
  [PATCH perf 2/4] perf top: Fix behaviour of Shift-Tab in annotated  view with nothing focussed Ben Hutchings <ben@decadent.org.uk> - 2016-01-19 22:40 +0100
  [PATCH perf 1/4] perf tools: Fix wrong indentation and build failure  with gcc 6 Ben Hutchings <ben@decadent.org.uk> - 2016-01-19 22:40 +0100
  Re: [PATCH perf 0/4] Build fixes for gcc 6 Markus Trippelsdorf <markus@trippelsdorf.de> - 2016-01-19 22:50 +0100
    Re: [PATCH perf 0/4] Build fixes for gcc 6 Ben Hutchings <ben@decadent.org.uk> - 2016-01-19 23:00 +0100
      Re: [PATCH perf 0/4] Build fixes for gcc 6 Ben Hutchings <ben@decadent.org.uk> - 2016-01-19 23:10 +0100
      Re: [PATCH perf 0/4] Build fixes for gcc 6 Markus Trippelsdorf <markus@trippelsdorf.de> - 2016-01-19 23:10 +0100
        Re: [PATCH perf 0/4] Build fixes for gcc 6 Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-19 23:30 +0100
          Re: [PATCH perf 0/4] Build fixes for gcc 6 Markus Trippelsdorf <markus@trippelsdorf.de> - 2016-01-19 23:40 +0100
            Re: [PATCH perf 0/4] Build fixes for gcc 6 Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-20 14:30 +0100
          Re: [PATCH perf 0/4] Build fixes for gcc 6 Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-19 23:40 +0100
            Re: [PATCH perf 0/4] Build fixes for gcc 6 Markus Trippelsdorf <markus@trippelsdorf.de> - 2016-01-19 23:50 +0100

csiph-web