VirtualBox

Changeset 988 in kBuild


Ignore:
Timestamp:
May 29, 2007 3:52:30 AM (18 years ago)
Author:
bird
Message:

kBuild profiling.

Location:
trunk/kBuild
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/footer.kmk

    r985 r988  
    2727ifndef __footer_kmk__
    2828# start-of-file-content
     29ifdef KBUILD_PROFILE_SELF
     30 _KBUILD_TS_FOOTER_START := $(nanots )
     31 $(info prof: $(int-sub $(_KBUILD_TS_FOOTER_START), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_FOOTER_START), $(_KBUILD_TS_PREV)) - start of footer.kmk)
     32 _KBUILD_TS_PREV := $(_KBUILD_TS_FOOTER_START)
     33endif
    2934
    3035#
     
    306311# $ (warning dbg _KEYWORDS := $(_KEYWORDS))
    307312
     313ifdef KBUILD_PROFILE_SELF
     314 _KBUILD_TS_NOW := $(nanots )
     315 $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done keywords)
     316 _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     317endif
     318
    308319
    309320#
     
    358369$(foreach trg, $(_ALL_INSTALLS),$(eval $(value def_inherit)))
    359370
     371ifdef KBUILD_PROFILE_SELF
     372 _KBUILD_TS_NOW := $(nanots )
     373 $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done target inheritance)
     374 _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     375endif
     376
    360377
    361378#
     
    380397properties_now :=
    381398properties_deferred :=
     399
     400ifdef KBUILD_PROFILE_SELF
     401 _KBUILD_TS_NOW := $(nanots )
     402 $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done template inheritance)
     403 _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     404endif
    382405
    383406
     
    558581bld_trg_cpu := $(BUILD_PLATFORM_CPU)
    559582$(foreach target, $(_ALL_BUILD_PLATFORM_TARGETS),$(eval $(value def_inherit_template)))
     583
     584ifdef KBUILD_PROFILE_SELF
     585 _KBUILD_TS_NOW := $(nanots )
     586 $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done common inheritance)
     587 _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     588endif
    560589
    561590
     
    687716## @todo Execute SDKS and TOOL inhertiance.
    688717
     718ifdef KBUILD_PROFILE_SELF
     719 _KBUILD_TS_NOW := $(nanots )
     720 $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done tools and sdks)
     721 _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     722endif
     723
    689724
    690725#
     
    870905$(foreach target, $(INSTALLS) $(INSTALLS.$(BUILD_TARGET)) $(INSTALLS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)), \
    871906        $(eval $(value def_pass1_install)))
     907
     908ifdef KBUILD_PROFILE_SELF
     909 _KBUILD_TS_NOW := $(nanots )
     910 $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done pass 1)
     911 _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     912endif
    872913
    873914
     
    12581299fetch: $(_FETCHES)
    12591300unfetch: $(_UNFETCHES)
     1301
     1302ifdef KBUILD_PROFILE_SELF
     1303 _KBUILD_TS_NOW := $(nanots )
     1304 $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done fetching targets)
     1305 _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     1306endif
    12601307
    12611308
     
    16731720mode := 0644
    16741721$(foreach target, $(LIBRARIES) $(LIBRARIES.$(BUILD_TARGET)) $(LIBRARIES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)), $(eval $(value def_lib)))
     1722
     1723ifdef KBUILD_PROFILE_SELF
     1724 _KBUILD_TS_NOW := $(nanots )
     1725 $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done library targets)
     1726 _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     1727endif
    16751728
    16761729
     
    20202073$(foreach target, $(BLDPROGS) $(BLDPROGS.$(BUILD_PLATFORM)) $(BLDPROGS.$(BUILD_PLATFORM).$(BUILD_PLATFORM_ARCH)), $(eval $(value def_bldprog)))
    20212074
     2075ifdef KBUILD_PROFILE_SELF
     2076 _KBUILD_TS_NOW := $(nanots )
     2077 $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done build program targets)
     2078 _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     2079endif
    20222080
    20232081
     
    20352093bld_trg_base_var := TARGET
    20362094$(foreach target, $(DLLS) $(DLLS.$(BUILD_TARGET)) $(DLLS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)), $(eval $(value def_link_common)))
     2095
     2096ifdef KBUILD_PROFILE_SELF
     2097 _KBUILD_TS_NOW := $(nanots )
     2098 $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done dll targets)
     2099 _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     2100endif
    20372101
    20382102
     
    20592123endif
    20602124
     2125ifdef KBUILD_PROFILE_SELF
     2126 _KBUILD_TS_NOW := $(nanots )
     2127 $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done import library targets)
     2128 _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     2129endif
     2130
    20612131
    20622132#
     
    20742144$(foreach target, $(PROGRAMS) $(PROGRAMS.$(BUILD_TARGET)) $(PROGRAMS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)), $(eval $(value def_link_common)))
    20752145
     2146ifdef KBUILD_PROFILE_SELF
     2147 _KBUILD_TS_NOW := $(nanots )
     2148 $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done program targets)
     2149 _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     2150endif
    20762151
    20772152
     
    20892164bld_trg_base_var := TARGET
    20902165$(foreach target, $(SYSMODS) $(SYSMODS.$(BUILD_TARGET)) $(SYSMODS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)), $(eval $(value def_link_common)))
     2166
     2167ifdef KBUILD_PROFILE_SELF
     2168 _KBUILD_TS_NOW := $(nanots )
     2169 $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done sysmod targets)
     2170 _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     2171endif
    20912172
    20922173
     
    24012482        $(eval $(value def_install)))
    24022483
     2484ifdef KBUILD_PROFILE_SELF
     2485 _KBUILD_TS_NOW := $(nanots )
     2486 $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done install targets)
     2487 _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     2488endif
     2489
    24032490
    24042491#
     
    24282515$(foreach directory,$(_DIR_ALL),$(eval $(def_mkdir_rule)))
    24292516
     2517ifdef KBUILD_PROFILE_SELF
     2518 _KBUILD_TS_NOW := $(nanots )
     2519 $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done directories)
     2520 _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     2521endif
     2522
    24302523
    24312524#
     
    24332526#
    24342527do-nothing:
     2528ifdef KBUILD_PROFILE_SELF
     2529        @$(ECHO) 'prof: $(int-sub $(nanots ), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(nanots ), $(_KBUILD_TS_PREV)) - executing $@'
     2530endif
    24352531        $(call MSG_NOTHING)
    24362532
     
    25722668        $(eval $(def_pass_order)))
    25732669
     2670ifdef KBUILD_PROFILE_SELF
     2671 _KBUILD_TS_NOW := $(nanots )
     2672 $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done passes)
     2673 _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     2674endif
    25742675
    25752676
     
    26332734
    26342735
     2736ifdef KBUILD_PROFILE_SELF
     2737 _KBUILD_TS_FOOTER_END := $(nanots )
     2738 $(info prof: $(int-sub $(_KBUILD_TS_FOOTER_END), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_FOOTER_END), $(_KBUILD_TS_PREV)) - end of footer.kmk)
     2739 $(info prof: footer.kmk: $(int-sub $(_KBUILD_TS_FOOTER_END), $(_KBUILD_TS_FOOTER_START)))
     2740 _KBUILD_TS_PREV := $(_KBUILD_TS_FOOTER_END)
     2741endif
     2742
    26352743# end-of-file-content
    26362744__footer_kmk__ := target
  • trunk/kBuild/header.kmk

    r985 r988  
    2727ifndef __header_kmk__
    2828# start-of-file-content
     29ifdef KBUILD_PROFILE_SELF
     30 _KBUILD_TS_HEADER_START := $(nanots ) # just a dummy warm up query
     31 $(info prof: since start - since previous - event description)
     32 _KBUILD_TS_HEADER_START := $(nanots )
     33 _KBUILD_TS_PREV := $(_KBUILD_TS_HEADER_START)
     34endif
    2935
    3036
     
    799805
    800806# Include the config.kmk we found file (or the default one).
    801 include $(_CFGFILE)
     807ifdef KBUILD_PROFILE_SELF
     808 _KBUILD_TS_NOW := $(nanots )
     809 $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - including $(_CFGFILE))
     810 _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     811
     812 include $(_CFGFILE)
     813
     814 _KBUILD_TS_NOW := $(nanots )
     815 $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - included $(_CFGFILE))
     816 _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     817else
     818 include $(_CFGFILE)
     819endif
     820
    802821
    803822
     
    963982
    964983
     984ifdef KBUILD_PROFILE_SELF
     985 _KBUILD_TS_HEADER_END := $(nanots )
     986 $(info prof: $(int-sub $(_KBUILD_TS_HEADER_END), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_HEADER_END), $(_KBUILD_TS_PREV)) - end of header.kmk)
     987 _KBUILD_TS_PREV := $(_KBUILD_TS_HEADER_END)
     988endif
     989
    965990# end-of-file-content
    966991__header_kmk__ := 1
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette