Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1012069pxf; Thu, 11 Mar 2021 22:52:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJxgdkWgmAQqH7SzmDl22yULm2RduLNZpKy8dHsSgyGudSrXvkqGoXUArw5uFNG1eCKVs6AW X-Received: by 2002:a05:6402:2552:: with SMTP id l18mr12269588edb.71.1615531935905; Thu, 11 Mar 2021 22:52:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615531935; cv=none; d=google.com; s=arc-20160816; b=WbwJhsqmFJPgD8ppEoqZiz2Lal5q6yXD9TyGsvGmvo58x9jRgxLaFAu9EIDc4008go 84Fcfo1kMPmOA/+jlo1E2SuHhgUtVZSqKEBDI2Agx+OTpzJPbKeCUwZstRMo+DVFBJBC 7YyassIck77oX1tlUiPezlzabNrnWPUgenHbT+LPgFGWYcXbU9f+cztJ9uNMFLRasGxh ci3izCzgWigh0CX67heeAyLEVXNxtOIyJJQG8St0oMrJcA27h2ZD+Wh6pVFQGy0t+H9B eD7AbKYQOCcDd+6wG6yIls/WTx3eqHoRaVxa/YqiM7rM9wlZ9LI6pwsIskKFLIqpZujT AfLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=olOHDDQPzCDUAIgylT0yhTexd+kOWsn2+hgUGM+iPsU=; b=Dc0uDFjAWQ5iIIUUjZQ2wJrZkC3wVcp7dhVrMOLqqhyNN2Rcegns3nSGNJsYpSvszJ plZijNnGvnJaMDoyk60YlFemIBio/lD2Qdf5fIopo5uOX4Oo0QhoOUY2HQz+8LWeYeLY XVouD10Y26/iWW/cvCgrScRQyHGrnyu5nvQMGm8l4N3tPzchH01ljrvk7RbyPkW0B0lq 7i94GpAfEzW6yeAlN1iODa1Rbp0IM1mY2OxSO3E0up/KAsJ6xnKCxJRod+Y4skdiQqTN uMMH3FAvQnE6fb3klT3MPrsd6mZlMOMjIuoMpkSDWX2muDAK4CEuRNyHceXryicJm8mS QInw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XiwRXEOV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z19si3743361ejl.54.2021.03.11.22.51.53; Thu, 11 Mar 2021 22:52:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XiwRXEOV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232144AbhCLGoI (ORCPT + 99 others); Fri, 12 Mar 2021 01:44:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:44768 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232135AbhCLGnj (ORCPT ); Fri, 12 Mar 2021 01:43:39 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6428364F7E; Fri, 12 Mar 2021 06:43:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615531419; bh=HNiMwqo1C1xuNs1I168/w0oQXwOxZBUoPxMzUr3M3P4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XiwRXEOVZMmXWF1jP+OsWNohVWFozGUrKKgMfuVkfQw8bJViTBi5KI57P5ABbnL0E P6pOjoV+wLQElTBNUp+c6aLvhLFUwTVuNnK6uwtIQvuwo20ohAd0C0hbiB7bniaqMY aMr+7hqINZH79GBycp8/wlE7LFPnsdLkTfo7e3Q9LfmYGCNxS4wKwC/VBSiigSzlES VfJqR52qI8TwTlW6irLoiHO4BZC6Uo+VkDejKcd+O/sEupUrojOvtQYg6Ze5oTr4s8 IYmFf9MCYuABzdVVDfPXcyD3FU6BYeYVYiW3JfvCTasdgRyWxixQM2sfAYCFslruy7 OOoEu4wxFt7iw== From: Masami Hiramatsu To: Steven Rostedt , Ingo Molnar Cc: X86 ML , Masami Hiramatsu , Daniel Xu , linux-kernel@vger.kernel.org, bpf@vger.kernel.org, kuba@kernel.org, mingo@redhat.com, ast@kernel.org, tglx@linutronix.de, kernel-team@fb.com, yhs@fb.com, Josh Poimboeuf Subject: [PATCH -tip v2 10/10] tracing: Remove kretprobe unknown indicator from stacktrace Date: Fri, 12 Mar 2021 15:43:34 +0900 Message-Id: <161553141415.1038734.16331033149026826592.stgit@devnote2> X-Mailer: git-send-email 2.25.1 In-Reply-To: <161553130371.1038734.7661319550287837734.stgit@devnote2> References: <161553130371.1038734.7661319550287837734.stgit@devnote2> User-Agent: StGit/0.19 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since the stacktrace API fixup the kretprobed address correctly, there is no need to convert the "kretprobe_trampoline" to "[unknown/kretprobe'd]" anymore. Remove it. Signed-off-by: Masami Hiramatsu Acked-by: Steven Rostedt (VMware) --- kernel/trace/trace_output.c | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index 61255bad7e01..f5f8b081b668 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c @@ -346,37 +346,18 @@ int trace_output_call(struct trace_iterator *iter, char *name, char *fmt, ...) } EXPORT_SYMBOL_GPL(trace_output_call); -#ifdef CONFIG_KRETPROBES -static inline const char *kretprobed(const char *name) -{ - static const char tramp_name[] = "kretprobe_trampoline"; - int size = sizeof(tramp_name); - - if (strncmp(tramp_name, name, size) == 0) - return "[unknown/kretprobe'd]"; - return name; -} -#else -static inline const char *kretprobed(const char *name) -{ - return name; -} -#endif /* CONFIG_KRETPROBES */ - void trace_seq_print_sym(struct trace_seq *s, unsigned long address, bool offset) { #ifdef CONFIG_KALLSYMS - char str[KSYM_SYMBOL_LEN]; - const char *name; + char name[KSYM_SYMBOL_LEN]; if (offset) - sprint_symbol(str, address); + sprint_symbol(name, address); else - kallsyms_lookup(address, NULL, NULL, NULL, str); - name = kretprobed(str); + kallsyms_lookup(address, NULL, NULL, NULL, name); - if (name && strlen(name)) { + if (strlen(name)) { trace_seq_puts(s, name); return; }