From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759676AbcBTXTA (ORCPT ); Sat, 20 Feb 2016 18:19:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56591 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759647AbcBTXSy (ORCPT ); Sat, 20 Feb 2016 18:18:54 -0500 Date: Sun, 21 Feb 2016 00:18:45 +0100 From: Jiri Olsa To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , David Ahern , Andi Kleen , Stephane Eranian , Wang Nan Subject: Re: [PATCH v6 09/25] perf hists: Basic support of hierarchical report view Message-ID: <20160220231845.GA17925@krava.homerouter.cpe> References: <1455631723-17345-1-git-send-email-namhyung@kernel.org> <1455631723-17345-10-git-send-email-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1455631723-17345-10-git-send-email-namhyung@kernel.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Sat, 20 Feb 2016 23:18:52 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 16, 2016 at 11:08:27PM +0900, Namhyung Kim wrote: SNIP > + int64_t cmp; > + > + while (*p != NULL) { > + parent = *p; > + iter = rb_entry(parent, struct hist_entry, rb_node_in); > + > + cmp = fmt->collapse(fmt, iter, he); > + if (!cmp) { > + he_stat__add_stat(&iter->stat, &he->stat); > + return iter; > + } > + > + if (cmp < 0) > + p = &parent->rb_left; > + else > + p = &parent->rb_right; > + } > + > + new = hist_entry__new(he, true); > + if (new == NULL) > + return NULL; > + > + hists__apply_filters(hists, new); > + hists->nr_entries++; > + > + /* save related format for output */ > + new->fmt = fmt; > + > + /* it's now passed to 'new' */ > + he->trace_output = NULL; should you do the same to he->srcline ? jirka