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:   Tue, 6 Dec 2016 12:16:31 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     kan.liang@...el.com
Cc:     peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
        linux-kernel@...r.kernel.org, alexander.shishkin@...ux.intel.com,
        tglx@...utronix.de, namhyung@...nel.org, jolsa@...nel.org,
        adrian.hunter@...el.com, wangnan0@...wei.com, mark.rutland@....com,
        andi@...stfloor.org
Subject: Re: [PATCH V2 08/13] perf tools: show kernel overhead

On Fri, Dec 02, 2016 at 04:19:16PM -0500, kan.liang@...el.com wrote:

SNIP

> diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
> index 02c8f7a..72c4412 100644
> --- a/tools/perf/util/machine.c
> +++ b/tools/perf/util/machine.c
> @@ -557,9 +557,31 @@ int machine__process_switch_event(struct machine *machine __maybe_unused,
>  
>  int machine__process_overhead_event(struct machine *machine __maybe_unused,
>  				    union perf_event *event,
> -				    struct perf_sample *sample __maybe_unused)
> -{
> -	dump_printf("\tUNSUPPORT TYPE 0x%lx!\n", event->overhead.type);
> +				    struct perf_sample *sample)
> +{
> +	switch (event->overhead.type) {
> +	case PERF_PMU_SAMPLE_OVERHEAD:
> +		dump_printf(" SAMPLE nr: %llu  time: %llu cpu %d\n",
> +			    event->overhead.entry.nr,
> +			    event->overhead.entry.time,
> +			    sample->cpu);
> +		break;
> +	case PERF_CORE_MUX_OVERHEAD:
> +		dump_printf(" MULTIPLEXING nr: %llu  time: %llu cpu %d\n",
> +			    event->overhead.entry.nr,
> +			    event->overhead.entry.time,
> +			    sample->cpu);
> +		break;
> +	case PERF_CORE_SB_OVERHEAD:
> +		dump_printf(" SIDE-BAND nr: %llu  time: %llu cpu %d\n",
> +			    event->overhead.entry.nr,
> +			    event->overhead.entry.time,
> +			    sample->cpu);
> +		break;
> +	default:
> +		dump_printf("\tUNSUPPORT TYPE 0x%lx!\n", event->overhead.type);
> +		return 0;
> +	}
>  	return 0;

normaly we call here perf_event__fprintf handlers, which you're
adding in the following patch.. above code seems redundant

thanks,
jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ