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:	Wed, 15 Jan 2014 16:00:57 +0100
From:	Jiri Olsa <jolsa@...hat.com>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	acme@...radead.org, namhyung@...nel.org, mingo@...nel.org,
	dsahern@...il.com, fweisbec@...il.com, adrian.hunter@...el.com,
	linux-kernel@...r.kernel.org, Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH 2/6] perf, tools: Support handling complete branch stacks
 as histograms v3

On Mon, Jan 13, 2014 at 05:04:17PM -0800, Andi Kleen wrote:
> From: Andi Kleen <ak@...ux.intel.com>

SNIP

>  
>  int machine__init(struct machine *machine, const char *root_dir, pid_t pid)
>  {
> @@ -1248,9 +1249,98 @@ struct branch_info *machine__resolve_bstack(struct machine *machine,
>  	return bi;
>  }
>  
> +static int add_callchain_ip(struct machine *machine,
> +			    struct thread *thread,
> +			    struct symbol **parent,
> +			    struct addr_location *root_al,
> +			    int cpumode,
> +			    u64 ip)
> +{
> +	struct addr_location al;
> +
> +	al.filtered = false;
> +	al.sym = NULL;
> +	if (cpumode == -1) {
> +		int i;
> +
> +		for (i = 0; i < (int)NCPUMODES && !al.sym; i++) {
> +			/*
> +			 * We cannot use the header.misc hint to determine whether a
> +			 * branch stack address is user, kernel, guest, hypervisor.
> +			 * Branches may straddle the kernel/user/hypervisor boundaries.
> +			 * Thus, we have to try consecutively until we find a match
> +			 * or else, the symbol is unknown
> +			 */
> +			thread__find_addr_location(thread, machine, cpumodes[i],
> +					MAP__FUNCTION,
> +					ip, &al);
> +		}

above code is already in ip__resolve_ams, maybe we could add put this
into separate function like 'thread__find_addr_location_cpumodes'

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