Changes in kernel/Makefile [510bc07:263bda2] in mainline


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/Makefile

    r510bc07 r263bda2  
    160160        CFLAGS = $(GCC_CFLAGS)
    161161        DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
     162        INSTRUMENTATION = -finstrument-functions
    162163endif
    163164
     
    165166        CFLAGS = $(GCC_CFLAGS)
    166167        DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
     168        INSTRUMENTATION = -finstrument-functions
    167169endif
    168170
     
    170172        CFLAGS = $(ICC_CFLAGS)
    171173        DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
     174        INSTRUMENTATION =
    172175endif
    173176
     
    176179        DEFS += $(CONFIG_DEFS)
    177180        DEPEND_DEFS = $(DEFS)
     181        INSTRUMENTATION =
    178182endif
    179183
     
    181185        CFLAGS = $(CLANG_CFLAGS)
    182186        DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
     187        INSTRUMENTATION =
    183188endif
    184189
     
    201206        generic/src/debug/symtab.c \
    202207        generic/src/debug/stacktrace.c \
     208        generic/src/debug/panic.c \
     209        generic/src/debug/debug.c \
    203210        generic/src/interrupt/interrupt.c \
    204211        generic/src/main/main.c \
     
    241248        generic/src/synch/spinlock.c \
    242249        generic/src/synch/condvar.c \
    243         generic/src/synch/rwlock.c \
    244250        generic/src/synch/mutex.c \
    245251        generic/src/synch/semaphore.c \
     
    294300                test/mm/slab1.c \
    295301                test/mm/slab2.c \
    296                 test/synch/rwlock1.c \
    297                 test/synch/rwlock2.c \
    298                 test/synch/rwlock3.c \
    299                 test/synch/rwlock4.c \
    300                 test/synch/rwlock5.c \
    301302                test/synch/semaphore1.c \
    302303                test/synch/semaphore2.c \
     
    360361endif
    361362
     363## Sources where instrumentation is enabled
     364#
     365
     366ifeq ($(CONFIG_LOG),y)
     367INSTRUMENTED_SOURCES = \
     368        generic/src/cpu/cpu.c \
     369        generic/src/main/kinit.c
     370endif
     371
    362372GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES)))
    363373ARCH_OBJECTS := $(addsuffix .o,$(basename $(ARCH_SOURCES)))
     
    419429
    420430%.o: %.c $(DEPEND)
    421         $(CC) $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS) -c -o $@ $<
     431        $(CC) $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS) $(if $(findstring $<,$(INSTRUMENTED_SOURCES)),$(INSTRUMENTATION)) -c -o $@ $<
    422432ifeq ($(PRECHECK),y)
    423433        $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS)
Note: See TracChangeset for help on using the changeset viewer.