~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/perf/pmu-events/Build

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 pmu-events-y    += pmu-events.o
  2 JDIR            =  pmu-events/arch/$(SRCARCH)
  3 JSON            =  $(shell [ -d $(JDIR) ] &&                            \
  4                         find $(JDIR) -name '*.json' -o -name 'mapfile.csv')
  5 JDIR_TEST       =  pmu-events/arch/test
  6 JSON_TEST       =  $(shell [ -d $(JDIR_TEST) ] &&                       \
  7                         find $(JDIR_TEST) -name '*.json')
  8 JEVENTS_PY      =  pmu-events/jevents.py
  9 METRIC_PY       =  pmu-events/metric.py
 10 METRIC_TEST_PY  =  pmu-events/metric_test.py
 11 EMPTY_PMU_EVENTS_C = pmu-events/empty-pmu-events.c
 12 PMU_EVENTS_C    =  $(OUTPUT)pmu-events/pmu-events.c
 13 METRIC_TEST_LOG =  $(OUTPUT)pmu-events/metric_test.log
 14 TEST_EMPTY_PMU_EVENTS_C = $(OUTPUT)pmu-events/test-empty-pmu-events.c
 15 EMPTY_PMU_EVENTS_TEST_LOG = $(OUTPUT)pmu-events/empty-pmu-events.log
 16 
 17 ifeq ($(JEVENTS_ARCH),)
 18 JEVENTS_ARCH=$(SRCARCH)
 19 endif
 20 JEVENTS_MODEL ?= all
 21 
 22 #
 23 # Locate/process JSON files in pmu-events/arch/
 24 # directory and create tables in pmu-events.c.
 25 #
 26 
 27 ifeq ($(NO_JEVENTS),1)
 28 $(PMU_EVENTS_C): $(EMPTY_PMU_EVENTS_C)
 29         $(call rule_mkdir)
 30         $(Q)$(call echo-cmd,gen)cp $< $@
 31 else
 32 $(METRIC_TEST_LOG): $(METRIC_TEST_PY) $(METRIC_PY)
 33         $(call rule_mkdir)
 34         $(Q)$(call echo-cmd,test)$(PYTHON) $< 2> $@ || (cat $@ && false)
 35 
 36 $(TEST_EMPTY_PMU_EVENTS_C): $(JSON) $(JSON_TEST) $(JEVENTS_PY) $(METRIC_PY) $(METRIC_TEST_LOG)
 37         $(call rule_mkdir)
 38         $(Q)$(call echo-cmd,gen)$(PYTHON) $(JEVENTS_PY) none none pmu-events/arch $@
 39 
 40 $(EMPTY_PMU_EVENTS_TEST_LOG): $(EMPTY_PMU_EVENTS_C) $(TEST_EMPTY_PMU_EVENTS_C)
 41         $(call rule_mkdir)
 42         $(Q)$(call echo-cmd,test)diff -u $^ 2> $@ || (cat $@ && false)
 43 
 44 $(PMU_EVENTS_C): $(JSON) $(JSON_TEST) $(JEVENTS_PY) $(METRIC_PY) $(METRIC_TEST_LOG) $(EMPTY_PMU_EVENTS_TEST_LOG)
 45         $(call rule_mkdir)
 46         $(Q)$(call echo-cmd,gen)$(PYTHON) $(JEVENTS_PY) $(JEVENTS_ARCH) $(JEVENTS_MODEL) pmu-events/arch $@
 47 endif
 48 
 49 # pmu-events.c file is generated in the OUTPUT directory so it needs a
 50 # separate rule to depend on it properly
 51 $(OUTPUT)pmu-events/pmu-events.o: $(PMU_EVENTS_C)
 52         $(call rule_mkdir)
 53         $(call if_changed_dep,cc_o_c)

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php