mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	Revert "perf pmu: Fix pmu events parsing rule"
As reported by Adrian Hunter, this breaks intel_pt event parsing:
  # perf record -e intel_pt//u uname
  event syntax error: 'intel_pt//u'
                               \___ parser error
  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
  #
This reverts commit 9a4a931ce8.
Reported-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-ye1o2mji7x68xotiot1tn1gp@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
			
			
This commit is contained in:
		
							parent
							
								
									5981ec3668
								
							
						
					
					
						commit
						4a35a9027f
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -224,15 +224,15 @@ event_def: event_pmu |
 | 
			
		|||
	   event_bpf_file
 | 
			
		||||
 | 
			
		||||
event_pmu:
 | 
			
		||||
PE_NAME '/' event_config '/'
 | 
			
		||||
PE_NAME opt_event_config
 | 
			
		||||
{
 | 
			
		||||
	struct list_head *list, *orig_terms, *terms;
 | 
			
		||||
 | 
			
		||||
	if (parse_events_copy_term_list($3, &orig_terms))
 | 
			
		||||
	if (parse_events_copy_term_list($2, &orig_terms))
 | 
			
		||||
		YYABORT;
 | 
			
		||||
 | 
			
		||||
	ALLOC_LIST(list);
 | 
			
		||||
	if (parse_events_add_pmu(_parse_state, list, $1, $3, false)) {
 | 
			
		||||
	if (parse_events_add_pmu(_parse_state, list, $1, $2, false)) {
 | 
			
		||||
		struct perf_pmu *pmu = NULL;
 | 
			
		||||
		int ok = 0;
 | 
			
		||||
		char *pattern;
 | 
			
		||||
| 
						 | 
				
			
			@ -262,7 +262,7 @@ PE_NAME '/' event_config '/'
 | 
			
		|||
		if (!ok)
 | 
			
		||||
			YYABORT;
 | 
			
		||||
	}
 | 
			
		||||
	parse_events_terms__delete($3);
 | 
			
		||||
	parse_events_terms__delete($2);
 | 
			
		||||
	parse_events_terms__delete(orig_terms);
 | 
			
		||||
	$$ = list;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue