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: <20140906193917.GF6059@krava.brq.redhat.com>
Date:	Sat, 6 Sep 2014 21:39:17 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	kan.liang@...el.com
Cc:	acme@...nel.org, linux-kernel@...r.kernel.org, ak@...ux.intel.com
Subject: Re: [PATCH v4 3/3] perf tools: Add support to new style format of
 kernel PMU event

On Tue, Sep 02, 2014 at 11:29:30AM -0400, kan.liang@...el.com wrote:
> From: Kan Liang <kan.liang@...el.com>

SNIP

>  }
> +|
> +PE_KERNEL_PMU_EVENT
> +{
> +	struct parse_events_evlist *data = _data;
> +	struct list_head *head = malloc(sizeof(*head));
> +	struct parse_events_term *term;
> +	struct list_head *list;
> +
> +	ABORT_ON(parse_events_term__num(&term, PARSE_EVENTS__TERM_TYPE_USER,
> +					$1, 1));
> +	ABORT_ON(!head);
> +	INIT_LIST_HEAD(head);
> +	list_add_tail(&term->list, head);
> +
> +	ALLOC_LIST(list);
> +	ABORT_ON(parse_events_add_pmu(list, &data->idx, "cpu", head));
> +	parse_events__free_terms(head);
> +	$$ = list;
> +}
> +|
> +PE_PMU_EVENT_PRE '-' PE_PMU_EVENT_SUF

so, how about the event alias has more than 2 parts a-b-c ?

if I remove 'stalled-cycles-frontend' from lexer (patch attached),
I'll get error parsing it with this code:

---
[jolsa@...va perf]$ ls -l /sys/devices/cpu/events/stalled-cycles-frontend 
-r--r--r-- 1 root root 4096 Sep  6 21:17 /sys/devices/cpu/events/stalled-cycles-frontend
[jolsa@...va perf]$ ./perf record -e stalled-cycles-frontend ls
invalid or unsupported event: 'stalled-cycles-frontend'
Run 'perf list' for a list of valid events

 usage: perf record [<options>] [<command>]
    or: perf record [<options>] -- <command> [<options>]

    -e, --event <event>   event selector. use 'perf list' to list available events
---

and.. if we will actually handle this correctly, I think maybe we want
to remove all the PERF_TYPE_HARDWARE equivalents? 

thanks,
jirka


---
diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l
index 4dd7f0467dd1..c1a354f651ca 100644
--- a/tools/perf/util/parse-events.l
+++ b/tools/perf/util/parse-events.l
@@ -176,8 +176,6 @@ branch_type		{ return term(yyscanner, PARSE_EVENTS__TERM_TYPE_BRANCH_SAMPLE_TYPE
 }
 
 cpu-cycles|cycles				{ return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_CPU_CYCLES); }
-stalled-cycles-frontend|idle-cycles-frontend	{ return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_STALLED_CYCLES_FRONTEND); }
-stalled-cycles-backend|idle-cycles-backend	{ return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_STALLED_CYCLES_BACKEND); }
 instructions					{ return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_INSTRUCTIONS); }
 cache-references				{ return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_CACHE_REFERENCES); }
 cache-misses					{ return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_CACHE_MISSES); }
--
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