Received: by 10.223.185.116 with SMTP id b49csp1658197wrg; Sun, 11 Feb 2018 17:58:01 -0800 (PST) X-Google-Smtp-Source: AH8x226JyBXZ9ypjHZ0RiuWuQXAg1ZhyzKujypLMThDz47l/6noZo1+p1jUtoSdjodrRxK+Z2QP+ X-Received: by 2002:a17:902:7e0e:: with SMTP id b14-v6mr9190731plm.97.1518400681587; Sun, 11 Feb 2018 17:58:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518400681; cv=none; d=google.com; s=arc-20160816; b=Qc+Pa5RSxohJ2u8M5kI8nz8JKbI5HfCJJ3Q/2vWK0rq/MxZmPvhxVPr7znmEWkWwVN gP8MTEcRjlXWtuZvvgEI/1BDyvf8SJx3DeN/PFlKyZkIrGaF/5Bo0J+ZWnJYBcPQRR0r ibnpB0emGLy2IbJSGhPTy9dNKlAi2KwkXPhgGMZaBh4EEGDaJS946j1nepZHxx19Qovn o2ZCpHJO4ulNE4OjWXIZw1u3IcaCitvjMwWhoORj8J4HMLVUYrqmBsJ25kUwkjlWqhN6 y4DCLym+oX9aRv14Iyq9pU6IL24YvslnpHJow8BvG/C8JGQNG8PLGjOb2pIQ/OUZ73s1 DTTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=cs89wRYclD9V5GrKkISsTvW3hNdRb5w0SuKO3pnXfUk=; b=A6SzPMf37WO9KCMXthHknPHEz4UU7bJYDQqbyzFllvMVagbAQi5K8D4UmsEIq5nRBG b+ZAqP9bahPyvwIzA+8mf/e2/Ba/vErM3z8+HCgHFsJ1Lg0at8uzpGbRAEVZsldDp2tQ TGQn3OuYEvW2DBCz4vpEozAFtEDjQUolQJczL+t2y8u/Tv6rjixvPd4lEiOQ+SnZmDiv z65eYubvW1V5C+SXHrT7VAYk3mev1Act8JyndVNKXlkBYsIngcVB5pXKSxS0SSdGiX/1 CyMvKKD1ikKzWFhqPC27kjalHPNDQVTiDcUOj9QKtyjFFPS1j1O7ul//Pxvut6/yTcql 03Dw== 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 n10-v6si2902466plk.255.2018.02.11.17.57.47; Sun, 11 Feb 2018 17:58:01 -0800 (PST) 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 S932452AbeBLB4O (ORCPT + 99 others); Sun, 11 Feb 2018 20:56:14 -0500 Received: from LGEAMRELO13.lge.com ([156.147.23.53]:36930 "EHLO lgeamrelo13.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932333AbeBLB4N (ORCPT ); Sun, 11 Feb 2018 20:56:13 -0500 Received: from unknown (HELO lgeamrelo01.lge.com) (156.147.1.125) by 156.147.23.53 with ESMTP; 12 Feb 2018 10:56:11 +0900 X-Original-SENDERIP: 156.147.1.125 X-Original-MAILFROM: namhyung@kernel.org Received: from unknown (HELO sejong) (10.177.227.17) by 156.147.1.125 with ESMTP; 12 Feb 2018 10:56:05 +0900 X-Original-SENDERIP: 10.177.227.17 X-Original-MAILFROM: namhyung@kernel.org Date: Mon, 12 Feb 2018 10:56:05 +0900 From: Namhyung Kim To: changbin.du@intel.com Cc: rostedt@goodmis.org, mingo@redhat.com, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, kernel-team@lge.com Subject: Re: [PATCH] tracing/fgraph: Missed irq return mark for leaf entry Message-ID: <20180212015605.GF31513@sejong> References: <1517413729-20411-1-git-send-email-changbin.du@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1517413729-20411-1-git-send-email-changbin.du@intel.com> User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 31, 2018 at 11:48:49PM +0800, changbin.du@intel.com wrote: > From: Changbin Du > > The fgraph forget to print irq return mark for leaf entry. Then we can see > unbalanced irq mark in the trace. This patch fix this. > > 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 | } > > Signed-off-by: Changbin Du Acked-by: Namhyung Kim Thanks, Namhyung > --- > kernel/trace/trace_functions_graph.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c > index 23c0b0c..169b3c4 100644 > --- a/kernel/trace/trace_functions_graph.c > +++ b/kernel/trace/trace_functions_graph.c > @@ -831,6 +831,7 @@ print_graph_entry_leaf(struct trace_iterator *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; > @@ -839,7 +840,6 @@ print_graph_entry_leaf(struct trace_iterator *iter, > > if (data) { > struct fgraph_cpu_data *cpu_data; > - int cpu = iter->cpu; > > cpu_data = per_cpu_ptr(data->cpu_data, cpu); > > @@ -869,6 +869,9 @@ print_graph_entry_leaf(struct trace_iterator *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); > } > > -- > 2.7.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html