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: <20120629163607.GB7847@infradead.org>
Date:	Fri, 29 Jun 2012 13:36:07 -0300
From:	Arnaldo Carvalho de Melo <acme@...hat.com>
To:	Jiri Olsa <jolsa@...hat.com>
Cc:	a.p.zijlstra@...llo.nl, mingo@...e.hu, paulus@...ba.org,
	cjashfor@...ux.vnet.ibm.com, fweisbec@...il.com,
	eranian@...gle.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/6] perf, tool: Add events support for pmu

Em Thu, Jun 14, 2012 at 10:38:39PM +0200, Jiri Olsa escreveu:
> The pmu sysfs record expose events group attribute with
> hardware events translations.
> 
> Adding support to read those and make it available throught:
> __u64 perf_pmu__event(struct perf_pmu *pmu, unsigned id)
> 
> Signed-off-by: Jiri Olsa <jolsa@...hat.com>
> ---
>  tools/perf/util/pmu.c |   98 ++++++++++++++++++++++++++++++++++++++++++++++++-
>  tools/perf/util/pmu.h |    2 +
>  2 files changed, 98 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
> index 1d73131..bf2a2a9 100644
> --- a/tools/perf/util/pmu.c
> +++ b/tools/perf/util/pmu.c
> @@ -88,6 +88,94 @@ static int pmu_format(char *name, struct list_head *format)
>  	return 0;
>  }
>  
> +const char *events_files[PERF_COUNT_HW_MAX] = {
> +	[PERF_COUNT_HW_CPU_CYCLES]              = "cycles",
> +	[PERF_COUNT_HW_INSTRUCTIONS]            = "instructions",
> +	[PERF_COUNT_HW_CACHE_REFERENCES]        = "cache_references",
> +	[PERF_COUNT_HW_CACHE_MISSES]            = "cache_misses",
> +	[PERF_COUNT_HW_BRANCH_INSTRUCTIONS]     = "branch_instructions",
> +	[PERF_COUNT_HW_BRANCH_MISSES]           = "branch_misses",
> +	[PERF_COUNT_HW_BUS_CYCLES]              = "bus_cycles",
> +	[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = "stalled_cycles_frontend",
> +	[PERF_COUNT_HW_STALLED_CYCLES_BACKEND]  = "stalled_cycles_backend",
> +	[PERF_COUNT_HW_REF_CPU_CYCLES]          = "ref_cycles",

we have this one:

static const char *perf_evsel__hw_names[PERF_COUNT_HW_MAX] = {

Can't it be used?

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