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]
Message-ID: <529E00F6.7000802@gmail.com>
Date:	Tue, 03 Dec 2013 09:04:06 -0700
From:	David Ahern <dsahern@...il.com>
To:	Adrian Hunter <adrian.hunter@...el.com>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
CC:	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
	Frederic Weisbecker <fweisbec@...il.com>,
	Jiri Olsa <jolsa@...hat.com>, Mike Galbraith <efault@....de>,
	Namhyung Kim <namhyung@...il.com>,
	Paul Mackerras <paulus@...ba.org>,
	Stephane Eranian <eranian@...gle.com>,
	Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH 2/7] perf script: Add an option to print the source line
 number

On 12/3/13, 12:23 AM, Adrian Hunter wrote:
> @@ -348,6 +355,24 @@ static void print_sample_start(struct perf_sample *sample,
>   	}
>   }
>
> +static void print_sample_finish(struct perf_evsel *evsel,
> +				struct addr_location *al)
> +{
> +	struct perf_event_attr *attr = &evsel->attr;
> +
> +	if (PRINT_FIELD(SRCLINE) && al->map && al->map->dso) {
> +		char *srcline;
> +
> +		srcline = get_srcline(al->map->dso,
> +				      map__rip_2objdump(al->map, al->addr));
> +		if (srcline != SRCLINE_UNKNOWN)
> +			printf("\n  %s", srcline);
> +		free_srcline(srcline);
> +	}
> +
> +	printf("\n");
> +}
> +
>   static bool is_bts_event(struct perf_event_attr *attr)
>   {
>   	return ((attr->type == PERF_TYPE_HARDWARE) &&
> @@ -438,7 +463,7 @@ static void print_sample_bts(union perf_event *event,
>   	     !output[attr->type].user_set))
>   		print_sample_addr(event, sample, machine, thread, attr);
>
> -	printf("\n");
> +	print_sample_finish(evsel, al);
>   }
>
>   static void process_event(union perf_event *event, struct perf_sample *sample,
> @@ -480,7 +505,7 @@ static void process_event(union perf_event *event, struct perf_sample *sample,
>   				     PERF_MAX_STACK_DEPTH);
>   	}
>
> -	printf("\n");
> +	print_sample_finish(evsel, al);
>   }
>
>   static int default_start_script(const char *script __maybe_unused,

What about callchains?

David

--
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