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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141113182123.GA6309@krava.redhat.com>
Date:	Thu, 13 Nov 2014 19:21:23 +0100
From:	Jiri Olsa <jolsa@...hat.com>
To:	kan.liang@...el.com
Cc:	acme@...nel.org, a.p.zijlstra@...llo.nl, eranian@...gle.com,
	linux-kernel@...r.kernel.org, mingo@...hat.com, paulus@...ba.org,
	ak@...ux.intel.com
Subject: Re: [PATCH V2 2/3] perf tool: re-organize
 thread__resolve_callchain_sample

On Wed, Nov 12, 2014 at 07:18:14PM -0500, kan.liang@...el.com wrote:

SNIP

> +static inline int __thread__resolve_callchain_sample(struct thread *thread,
> +						     u64 ip, u8 *cpumode,
> +						     struct symbol **parent,
> +						     struct addr_location *root_al)
> +{
> +	struct addr_location al;
> +
> +	if (ip >= PERF_CONTEXT_MAX) {
> +		switch (ip) {
> +		case PERF_CONTEXT_HV:
> +			*cpumode = PERF_RECORD_MISC_HYPERVISOR;
> +			break;
> +		case PERF_CONTEXT_KERNEL:
> +			*cpumode = PERF_RECORD_MISC_KERNEL;
> +			break;
> +		case PERF_CONTEXT_USER:
> +			*cpumode = PERF_RECORD_MISC_USER;
> +			break;
> +		default:
> +			pr_debug("invalid callchain context: "
> +				 "%"PRId64"\n", (s64) ip);
> +			/*
> +			 * It seems the callchain is corrupted.
> +			 * Discard all.
> +			 */
> +			callchain_cursor_reset(&callchain_cursor);
> +			return 1;
> +		}
> +		return 0;
> +	}
> +
> +	al.filtered = 0;
> +	thread__find_addr_location(thread, *cpumode,
> +				   MAP__FUNCTION, ip, &al);
> +	if (al.sym != NULL) {
> +		if (sort__has_parent && !*parent &&
> +		    symbol__match_regex(al.sym, &parent_regex))
> +			*parent = al.sym;
> +		else if (have_ignore_callees && root_al &&
> +		  symbol__match_regex(al.sym, &ignore_callees_regex)) {
> +			/* Treat this symbol as the root,
> +			   forgetting its callees. */
> +			*root_al = al;
> +			callchain_cursor_reset(&callchain_cursor);
> +		}
> +	}
> +
> +	return callchain_cursor_append(&callchain_cursor,
> +				       ip, al.map, al.sym);

you added slightly more than Andi ;-)
http://marc.info/?l=linux-kernel&m=141584439819848&w=2

Any chance you guys could sync on this? ..you're touching the
same code.. Andi, maybe you wouldn't mind having this patch
instead of your change.. looks like the only extra part is the
cpumode resolve.

thanks,
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ