Blame view

kernel/linux-imx6_3.14.28/tools/perf/util/pmu.l 571 Bytes
6b13f685e   김민수   BSP 최초 추가
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
  %option prefix="perf_pmu_"
  
  %{
  #include <stdlib.h>
  #include <linux/bitops.h>
  #include "pmu.h"
  #include "pmu-bison.h"
  
  static int value(int base)
  {
  	long num;
  
  	errno = 0;
  	num = strtoul(perf_pmu_text, NULL, base);
  	if (errno)
  		return PP_ERROR;
  
  	perf_pmu_lval.num = num;
  	return PP_VALUE;
  }
  
  %}
  
  num_dec         [0-9]+
  
  %%
  
  {num_dec}	{ return value(10); }
  config		{ return PP_CONFIG; }
  config1		{ return PP_CONFIG1; }
  config2		{ return PP_CONFIG2; }
  -		{ return '-'; }
  :		{ return ':'; }
  ,		{ return ','; }
  .		{ ; }
  
  		{ ; }
  
  %%
  
  int perf_pmu_wrap(void)
  {
  	return 1;
  }