From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755393AbcGHPSs (ORCPT ); Fri, 8 Jul 2016 11:18:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58900 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754831AbcGHPSi (ORCPT ); Fri, 8 Jul 2016 11:18:38 -0400 Date: Fri, 8 Jul 2016 17:18:36 +0200 From: Jiri Olsa To: Song Shan Gong Cc: acme@kernel.org, jolsa@kernel.org, dsahern@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] [RFC V1]s390/perf: fix 'start' address of module's map Message-ID: <20160708151836.GG31763@krava> References: <1467856176-8712-1-git-send-email-gongss@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1467856176-8712-1-git-send-email-gongss@linux.vnet.ibm.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 08 Jul 2016 15:18:38 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 07, 2016 at 09:49:36AM +0800, Song Shan Gong wrote: > At preset, when creating module's map, perf gets 'start' address by parsing > 'proc/modules', but it's module base address, isn't the start address of > '.text' section. In most archs, it's OK. But for s390, it places 'GOT' and > 'PLT' relocations before '.text' section. So there exists an offset between > module base address and '.text' section, which will incur wrong symbol > resolution for modules. > > Fix this bug by getting 'start' address of module's map from parsing > '/sys/module/[module name]/sections/.text', not from '/proc/modules'. cool, does this fix the 'perf test 1' for s390? that'd be great I'll send few coments shortly thanks, jirka