Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2009065imm; Tue, 10 Jul 2018 11:31:10 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe1fNKxAjeuq90LABa2qY+y6tBcaXyj/4eS1PeXLORvuGKdnoi2Tjjh8WOl0s5Sp6yx6pQ9 X-Received: by 2002:a63:4d5:: with SMTP id 204-v6mr23791390pge.129.1531247470484; Tue, 10 Jul 2018 11:31:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531247470; cv=none; d=google.com; s=arc-20160816; b=gtcjvLtwyx+Ak8NZk696rQ6OjXh78xF5wq4+hIBfGdAL0Rk4EuVDSFWFWgmCTpWiYE BWVU30iaxuAHp8PnG95DUnGQ8ooPSSad01W3bjlYBHRREwtmeqTIrhe9nkSOvd5qvqCo 43GNBGSheBgjhDHWRG7RCJLyeZH8ognCD8T5T2xyR02W7GhiK4lyVQWgHNPFFwKl5Yxg 2WEQxFGZoeRAybmJaAle1nHKU0vA1HUfDrQi64L/ir6UwjoLjLoJ0+ZBMguwSJ2PnIEt S/sIgM06XXswGJ0qm6aXjkFrM5OfDhyq166ho6n3zgOPjffo8u+1TVvpR9sa8aPP54VT EJYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=fiIiK7OSrvvuAowVpeFdKGJM/6G+UanhEPGdKQ44+h4=; b=ilOjxOjDoDvn8+MP9f4wAkEwdE0zmcfDS5ipm2goU+0Xsny5YJGLoQ1EOFB8XXSREo H0dtgOtyubvwi5ZM86K0zBWA7k8v5GBk6UM3wBcoatol2Zeuf7qlEqMXf7npSGCLUQMj nXQqJQB07WTmGoHnfiIVCpQLHUpKxpm/KD1kLva6+V+pnfWqecP/KiFGSkZTf0HWIIWF GGqHQE6BXI0M5Fft7I/0tN5/t2Yw0wznW0YSLFJNx48rrconEDJSkeBvTX4hIbGV+mw/ RuWWrT3qUFPcch+9Nhq1p3X3Jj+E0p/cOFEixYNdOjIB3CSzxKRz717G6v1RpOLhY4BG 5mUQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b8-v6si17784099plb.125.2018.07.10.11.30.55; Tue, 10 Jul 2018 11:31:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387900AbeGJS36 (ORCPT + 99 others); Tue, 10 Jul 2018 14:29:58 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45466 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732596AbeGJS35 (ORCPT ); Tue, 10 Jul 2018 14:29:57 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 2803EEC2; Tue, 10 Jul 2018 18:29:46 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Changbin Du , "Steven Rostedt (VMware)" Subject: [PATCH 4.9 20/52] tracing: Fix missing return symbol in function_graph output Date: Tue, 10 Jul 2018 20:24:48 +0200 Message-Id: <20180710182451.370757987@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180710182449.285532226@linuxfoundation.org> References: <20180710182449.285532226@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Changbin Du commit 1fe4293f4b8de75824935f8d8e9a99c7fc6873da upstream. The function_graph tracer does not show the interrupt return marker for the leaf entry. On leaf entries, we see an unbalanced interrupt marker (the interrupt was entered, but nevern left). Before: 1) | SyS_write() { 1) | __fdget_pos() { 1) 0.061 us | __fget_light(); 1) 0.289 us | } 1) | vfs_write() { 1) 0.049 us | rw_verify_area(); 1) + 15.424 us | __vfs_write(); 1) ==========> | 1) 6.003 us | smp_apic_timer_interrupt(); 1) 0.055 us | __fsnotify_parent(); 1) 0.073 us | fsnotify(); 1) + 23.665 us | } 1) + 24.501 us | } After: 0) | SyS_write() { 0) | __fdget_pos() { 0) 0.052 us | __fget_light(); 0) 0.328 us | } 0) | vfs_write() { 0) 0.057 us | rw_verify_area(); 0) | __vfs_write() { 0) ==========> | 0) 8.548 us | smp_apic_timer_interrupt(); 0) <========== | 0) + 36.507 us | } /* __vfs_write */ 0) 0.049 us | __fsnotify_parent(); 0) 0.066 us | fsnotify(); 0) + 50.064 us | } 0) + 50.952 us | } Link: http://lkml.kernel.org/r/1517413729-20411-1-git-send-email-changbin.du@intel.com Cc: stable@vger.kernel.org Fixes: f8b755ac8e0cc ("tracing/function-graph-tracer: Output arrows signal on hardirq call/return") Signed-off-by: Changbin Du Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Greg Kroah-Hartman --- kernel/trace/trace_functions_graph.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/kernel/trace/trace_functions_graph.c +++ b/kernel/trace/trace_functions_graph.c @@ -830,6 +830,7 @@ print_graph_entry_leaf(struct trace_iter struct ftrace_graph_ret *graph_ret; struct ftrace_graph_ent *call; unsigned long long duration; + int cpu = iter->cpu; int i; graph_ret = &ret_entry->ret; @@ -838,7 +839,6 @@ print_graph_entry_leaf(struct trace_iter if (data) { struct fgraph_cpu_data *cpu_data; - int cpu = iter->cpu; cpu_data = per_cpu_ptr(data->cpu_data, cpu); @@ -868,6 +868,9 @@ print_graph_entry_leaf(struct trace_iter trace_seq_printf(s, "%ps();\n", (void *)call->func); + print_graph_irq(iter, graph_ret->func, TRACE_GRAPH_RET, + cpu, iter->ent->pid, flags); + return trace_handle_return(s); }