From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752744AbdBOSS0 (ORCPT ); Wed, 15 Feb 2017 13:18:26 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:47180 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752043AbdBOSSX (ORCPT ); Wed, 15 Feb 2017 13:18:23 -0500 From: "Naveen N. Rao" To: Ananth N Mavinakayanahalli , Masami Hiramatsu , Arnaldo Carvalho de Melo Cc: Ingo Molnar , Namhyung Kim , linux-kernel@vger.kernel.org Subject: [PATCH 3/3] perf: revert "perf probe: Fix probing kretprobes" Date: Wed, 15 Feb 2017 23:47:54 +0530 X-Mailer: git-send-email 2.11.0 In-Reply-To: References: <20170215175346.GE3169@naverao1-tp.localdomain> In-Reply-To: References: X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17021518-0032-0000-0000-000001E6947F X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17021518-0033-0000-0000-00001216D78A Message-Id: <5983c261ca94850ada6a1a617c07c261023da20f.1487181941.git.naveen.n.rao@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-02-15_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1702150170 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 25dd9171f51c ("perf probe: Fix probing kretprobes"). kprobe_events now accepts offsets for kretprobes. perf needs to be able to place return probes on static functions that have the same name. Using the function name doesn't allow us to do that. Instead, we should use the same scheme we use for kprobes: offset'ing from _text/_stext. Signed-off-by: Naveen N. Rao --- tools/perf/util/probe-event.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index 6a6f44dd594b..fa7f81af11e8 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c @@ -757,7 +757,7 @@ post_process_kernel_probe_trace_events(struct probe_trace_event *tevs, } for (i = 0; i < ntevs; i++) { - if (!tevs[i].point.address || tevs[i].point.retprobe) + if (!tevs[i].point.address) continue; /* If we found a wrong one, mark it by NULL symbol */ if (kprobe_warn_out_range(tevs[i].point.symbol, @@ -2841,7 +2841,7 @@ static int find_probe_trace_events_from_map(struct perf_probe_event *pev, } /* Note that the symbols in the kmodule are not relocated */ - if (!pev->uprobes && !pp->retprobe && !pev->target) { + if (!pev->uprobes && !pev->target) { reloc_sym = kernel_get_ref_reloc_sym(); if (!reloc_sym) { pr_warning("Relocated base symbol is not found!\n"); -- 2.11.0