lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 01 Oct 2017 16:12:36 +0200
From:   Milian Wolff <milian.wolff@...b.com>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     acme@...nel.org, jolsa@...nel.org,
        Jin Yao <yao.jin@...ux.intel.com>,
        Linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
        Arnaldo Carvalho de Melo <acme@...hat.com>,
        David Ahern <dsahern@...il.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH v3 03/13] perf report: create real callchain entries for inlined frames

On Dienstag, 19. September 2017 14:27:19 CEST Jiri Olsa wrote:
> On Wed, Sep 06, 2017 at 03:54:51PM +0200, Milian Wolff wrote:
> 
> SNIP
> 
> > +void inlines__tree_insert(struct rb_root *tree, struct inline_node
> > *inlines) +{
> > +	struct rb_node **p = &tree->rb_node;
> > +	struct rb_node *parent = NULL;
> > +	const u64 addr = inlines->addr;
> > +	struct inline_node *i;
> > +
> > +	while (*p != NULL) {
> > +		parent = *p;
> > +		i = rb_entry(parent, struct inline_node, rb_node);
> > +		if (addr < i->addr)
> > +			p = &(*p)->rb_left;
> > +		else
> > +			p = &(*p)->rb_right;
> > +	}
> > +	rb_link_node(&inlines->rb_node, parent, p);
> > +	rb_insert_color(&inlines->rb_node, tree);
> > +}
> > +
> > +struct inline_node *inlines__tree_find(struct rb_root *tree, u64 addr)
> > +{
> > +	struct rb_node *n = tree->rb_node;
> > +
> > +	while (n) {
> > +		struct inline_node *i = rb_entry(n, struct inline_node,
> > +						 rb_node);
> > +
> > +		if (addr < i->addr)
> > +			n = n->rb_left;
> > +		else if (addr > i->addr)
> > +			n = n->rb_right;
> > +		else
> > +			return i;
> > +	}
> > +
> > +	return NULL;
> > +}
> > +
> > +void inlines__tree_delete(struct rb_root *tree)
> > +{
> > +	struct inline_node *pos;
> > +	struct rb_node *next = rb_first(tree);
> > +
> > +	while (next) {
> > +		pos = rb_entry(next, struct inline_node, rb_node);
> > +		next = rb_next(&pos->rb_node);
> > +		rb_erase(&pos->rb_node, tree);
> > +		inline_node__delete(pos);
> > +	}
> > +}
> 
> could you please split the patch at least into
> above 'adding related inline_node tree managing functions + append_inlines'
> 
> and below 'struct inline_list' changes
> 
> not sure the 'struct symbol::inlined' could be separated,
> I'd take it as a bonus and nice gesture to reviewers ;-)

I have now split it up in three parts:

a) use symbol in srcline api and create fake symbols
b) use srcline string in srcline api
c) create real callchain entries

I hope that is easier to review. Thanks for the comments so far. I'll push a 
new version of this patch series now.

Cheers

-- 
Milian Wolff | milian.wolff@...b.com | Senior Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ