This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [RFC PATCH v1 1/2] perf/sdt : Listing of SDT markers by perf
- From: Namhyung Kim <namhyung at kernel dot org>
- To: Hemant Kumar <hkshaw at linux dot vnet dot ibm dot com>
- Cc: linux-kernel at vger dot kernel dot org, srikar at linux dot vnet dot ibm dot com, peterz at infradead dot org, oleg at redhat dot com, hegdevasant at linux dot vnet dot ibm dot com, mingo at redhat dot com, anton at redhat dot com, systemtap at sourceware dot org, masami dot hiramatsu dot pt at hitachi dot com, aravinda at linux dot vnet dot ibm dot com, penberg at iki dot fi
- Date: Wed, 26 Feb 2014 16:58:01 +0900
- Subject: Re: [RFC PATCH v1 1/2] perf/sdt : Listing of SDT markers by perf
- Authentication-results: sourceware.org; auth=none
- References: <20140224090833 dot 7998 dot 5416 dot stgit at hemant-fedora> <20140224091449 dot 7998 dot 25624 dot stgit at hemant-fedora> <87vbw3vfxy dot fsf at sejong dot aot dot lge dot com> <530C5C69 dot 9080800 at linux dot vnet dot ibm dot com>
Hi Hemant,
On Tue, 25 Feb 2014 14:33:37 +0530, Hemant Kumar wrote:
> On 02/25/2014 12:26 PM, Namhyung Kim wrote:
>>> + /* Translation from file representation to memory representation */
>>> + if (gelf_xlatetom(*elf, &dst, &src,
>>> + elf_getident(*elf, NULL)[EI_DATA]) == NULL)
>> Do we really need this xlate function? It seems elf_getdata() already
>> did necessary conversions so only thing we need to do is checking its
>> class and read out the addresses in a proper length, no?
>>
>
> Hmm, alright. I thought the conversion was necessary for cross
> developed binaries.
> But I guess elf_getdata() should do all these conversions. Will remove that.
Looking at the source, it seems we still need to xlate() anyway. The
conversion function (elf_cvt_note) only handles the header part since it
cannot know what the content is.
But obviously we cannot enable/disable the marker as we cannot run the
cross-built binary - it only can be used to show the list of SDT markers
in the binary. Or else, we can simply deny to do it..
Thanks,
Namhyung