VirtualBox

Changeset 2008 in kBuild


Ignore:
Timestamp:
Oct 31, 2008 3:55:06 AM (16 years ago)
Author:
bird
Message:

footer.kmk,header.kmk: KBUILD_PROFILE_SELF updates.

Location:
trunk/kBuild
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/footer.kmk

    r2007 r2008  
    3535# start-of-file-content
    3636ifdef KBUILD_PROFILE_SELF
    37  _KBUILD_TS_FOOTER_START := $(nanots )
    38  $(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)
    39  $(info stat: $(make-stats ))
    40  _KBUILD_TS_PREV := $(_KBUILD_TS_FOOTER_START)
     37 $(evalcall def_profile_self, start of footer.kmk)
     38 _KBUILD_TS_FOOTER_START := $(_KBUILD_TS_PREV)
    4139endif
    4240
     
    849847
    850848ifdef KBUILD_PROFILE_SELF
    851  _KBUILD_TS_NOW := $(nanots )
    852  $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done keywords)
    853  $(info stat: $(make-stats ))
    854  _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     849 $(evalcall def_profile_self, done keywords)
    855850endif
    856851
     
    930925
    931926ifdef KBUILD_PROFILE_SELF
    932  _KBUILD_TS_NOW := $(nanots )
    933  $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done target inheritance)
    934  $(info stat: $(make-stats ))
    935  _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     927 $(evalcall def_profile_self, done target inheritance)
    936928endif
    937929
     
    969961
    970962ifdef KBUILD_PROFILE_SELF
    971  _KBUILD_TS_NOW := $(nanots )
    972  $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done template inheritance)
    973  $(info stat: $(make-stats ))
    974  _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     963 $(evalcall def_profile_self, done template inheritance)
    975964endif
    976965
     
    11731162
    11741163ifdef KBUILD_PROFILE_SELF
    1175  _KBUILD_TS_NOW := $(nanots )
    1176  $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done template/target expansion)
    1177  $(info stat: $(make-stats ))
    1178  _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     1164 $(evalcall def_profile_self, done template/target expansion)
    11791165endif
    11801166
     
    13561342
    13571343ifdef KBUILD_PROFILE_SELF
    1358  _KBUILD_TS_NOW := $(nanots )
    1359  $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done tools, sdks and units)
    1360  $(info stat: $(make-stats ))
    1361  _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     1344 $(evalcall def_profile_self, done tools + sdks + units)
    13621345endif
    13631346
     
    15691552
    15701553ifdef KBUILD_PROFILE_SELF
    1571  _KBUILD_TS_NOW := $(nanots )
    1572  $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done pass 1)
    1573  $(info stat: $(make-stats ))
    1574  _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     1554 $(evalcall def_profile_self, done pass 1)
    15751555endif
    15761556
     
    19721952
    19731953ifdef KBUILD_PROFILE_SELF
    1974  _KBUILD_TS_NOW := $(nanots )
    1975  $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done fetching targets)
    1976  $(info stat: $(make-stats ))
    1977  _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     1954 $(evalcall def_profile_self, done fetching targets)
    19781955endif
    19791956
     
    24912468
    24922469ifdef KBUILD_PROFILE_SELF
    2493  _KBUILD_TS_NOW := $(nanots )
    2494  $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done library targets)
    2495  $(info stat: $(make-stats ))
    2496  _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     2470 $(evalcall def_profile_self, done library targets)
    24972471endif
    24982472
     
    29162890
    29172891ifdef KBUILD_PROFILE_SELF
    2918  _KBUILD_TS_NOW := $(nanots )
    2919  $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done build program targets)
    2920  $(info stat: $(make-stats ))
    2921  _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     2892 $(evalcall def_profile_self, done build program targets)
    29222893endif
    29232894
     
    29382909
    29392910ifdef KBUILD_PROFILE_SELF
    2940  _KBUILD_TS_NOW := $(nanots )
    2941  $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done dll targets)
    2942  $(info stat: $(make-stats ))
    2943  _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     2911 $(evalcall def_profile_self, done dll targets)
    29442912endif
    29452913
     
    29682936
    29692937ifdef KBUILD_PROFILE_SELF
    2970  _KBUILD_TS_NOW := $(nanots )
    2971  $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done import library targets)
    2972  $(info stat: $(make-stats ))
    2973  _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     2938 $(evalcall def_profile_self, done import library targets)
    29742939endif
    29752940
     
    29902955
    29912956ifdef KBUILD_PROFILE_SELF
    2992  _KBUILD_TS_NOW := $(nanots )
    2993  $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done program targets)
    2994  $(info stat: $(make-stats ))
    2995  _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     2957 $(evalcall def_profile_self, done program targets)
    29962958endif
    29972959
     
    30122974
    30132975ifdef KBUILD_PROFILE_SELF
    3014  _KBUILD_TS_NOW := $(nanots )
    3015  $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done sysmod targets)
    3016  $(info stat: $(make-stats ))
    3017  _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     2976 $(evalcall def_profile_self, done sysmod targets)
    30182977endif
    30192978
     
    33543313
    33553314ifdef KBUILD_PROFILE_SELF
    3356  _KBUILD_TS_NOW := $(nanots )
    3357  $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done install targets)
    3358  $(info stat: $(make-stats ))
    3359  _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     3315 $(evalcall def_profile_self, done install targets)
    33603316endif
    33613317
     
    33933349
    33943350ifdef KBUILD_PROFILE_SELF
    3395  _KBUILD_TS_NOW := $(nanots )
    3396  $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done directories)
    3397  $(info stat: $(make-stats ))
    3398  _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     3351 $(evalcall def_profile_self, done directories)
    33993352endif
    34003353
     
    34043357#
    34053358do-nothing:
     3359        %$(call MSG_NOTHING)
    34063360ifdef KBUILD_PROFILE_SELF
    3407         @$(ECHO) 'prof: $(int-sub $(nanots ), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(nanots ), $(_KBUILD_TS_PREV)) - executing $@'
     3361        @$(ECHO) 'prof: $(call _KBUILD_FMT_ELAPSED_EX, $(nanots ), $(_KBUILD_TS_HEADER_START)) - $(call _KBUILD_FMT_ELAPSED_EX, $(nanots ), $(_KBUILD_TS_PREV)) - executing $@'
     3362 ifeq ($(KBUILD_PROFILE_SELF),2)
    34083363        @$(ECHO) 'stat: $(make-stats )'
    3409 endif
    3410         %$(call MSG_NOTHING)
     3364 endif
     3365endif
    34113366
    34123367
     
    35923547
    35933548ifdef KBUILD_PROFILE_SELF
    3594  _KBUILD_TS_NOW := $(nanots )
    3595  $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done passes)
    3596  $(info stat: $(make-stats ))
    3597  _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     3549 $(evalcall def_profile_self, done passes)
    35983550endif
    35993551
     
    36683620
    36693621ifdef KBUILD_PROFILE_SELF
    3670  _KBUILD_TS_FOOTER_END := $(nanots )
    3671  $(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)
    3672  $(info prof: footer.kmk: $(int-sub $(_KBUILD_TS_FOOTER_END), $(_KBUILD_TS_FOOTER_START)))
    3673  $(info stat: $(make-stats ))
    3674  $(info prof: ALL=$(words $(_ALL_TARGETS)) BLDPROGS=$(words $(_ALL_BLDPROGS)) LIBRARIES=$(words $(_ALL_LIBRARIES)) IMPORT_LIBS=$(words $(IMPORT_LIBS)) DLLS=$(words $(DLLS)) PROGRAMS=$(words $(_ALL_PROGRAMS)) )
    3675  $(info prof: SYSMODS=$(words $(_ALL_SYSMODS)) OTHERS=$(words $(_ALL_OTHERS)) INSTALLS=$(words $(_ALL_INSTALLS)) FETCHES=$(words $(_ALL_FETCHES)) PACKING=$(words $(_PACKING)) TESTING=$(words $(TESTING)) )
    3676  $(info prof: DIRS=$(words $(_DIR_ALL)) TOOLS=$(words $(_TOOLS)) SDKS=$(words $(_SDKS)) USES=$(words $(_USES)) OUT_FILES=$(words $(_OUT_FILES)) OBJS=$(words $(_OBJS)) CLEAN_FILES=$(words $(CLEAN_FILES) $(OTHER_CLEAN)) )
    3677  $(info prof: DEPFILES_INCLUDED=$(words $(_DEPFILES_INCLUDED)) DEPFILES=$(words $(_DEPFILES)) MAKEFILES=$(words $(MAKEFILE_LIST)) )
    3678  _KBUILD_TS_PREV := $(_KBUILD_TS_FOOTER_END)
     3622 $(evalcall def_profile_self, end of footer.kmk)
     3623 _KBUILD_TS_FOOTER_END := $(_KBUILD_TS_PREV)
     3624
     3625 ifneq ($(KBUILD_PROFILE_SELF),0)
     3626  $(info prof: ALL=$(words $(_ALL_TARGETS)) BLDPROGS=$(words $(_ALL_BLDPROGS)) LIBRARIES=$(words $(_ALL_LIBRARIES)) IMPORT_LIBS=$(words $(IMPORT_LIBS)) DLLS=$(words $(DLLS)) PROGRAMS=$(words $(_ALL_PROGRAMS)) )
     3627  $(info prof: SYSMODS=$(words $(_ALL_SYSMODS)) OTHERS=$(words $(_ALL_OTHERS)) INSTALLS=$(words $(_ALL_INSTALLS)) FETCHES=$(words $(_ALL_FETCHES)) PACKING=$(words $(_PACKING)) TESTING=$(words $(TESTING)) )
     3628  $(info prof: DIRS=$(words $(_DIR_ALL)) TOOLS=$(words $(_TOOLS)) SDKS=$(words $(_SDKS)) USES=$(words $(_USES)) OUT_FILES=$(words $(_OUT_FILES)) OBJS=$(words $(_OBJS)) CLEAN_FILES=$(words $(CLEAN_FILES) $(OTHER_CLEAN)) )
     3629  $(info prof: DEPFILES_INCLUDED=$(words $(_DEPFILES_INCLUDED)) DEPFILES=$(words $(_DEPFILES)) MAKEFILES=$(words $(MAKEFILE_LIST)) )
     3630 endif
    36793631endif
    36803632
  • trunk/kBuild/header.kmk

    r1782 r2008  
    3636ifdef KBUILD_PROFILE_SELF
    3737 _KBUILD_TS_HEADER_START := $(nanots ) # just a dummy warm up query
    38  $(info prof: since start - since previous - event description)
    39  $(info stat: $(make-stats ))
     38 $(info prof: since start - since previous -- event description)
     39 ifeq ($(KBUILD_PROFILE_SELF),2)
     40  $(info stat: $(make-stats ))
     41 endif
    4042 _KBUILD_TS_HEADER_START := $(nanots )
    4143 _KBUILD_TS_PREV := $(_KBUILD_TS_HEADER_START)
     44
     45 _KBUILD_FMT_ELAPSED_EX = $(int-div $(int-add $(int-sub $1, $2),500000),1000000)ms
     46 _KBUILD_FMT_ELAPSED = $(call _KBUILD_FMT_ELAPSED_EX,$(_KBUILD_TS_NOW),$1)
     47
     48define def_profile_self
     49 _KBUILD_TS_NOW := $(nanots )
     50 $(info prof: $(call _KBUILD_FMT_ELAPSED,$(_KBUILD_TS_HEADER_START)) - $(call _KBUILD_FMT_ELAPSED, $(_KBUILD_TS_PREV)) -- $(strip $1))
     51 ifeq ($(KBUILD_PROFILE_SELF),2)
     52  $(info stat: $(make-stats ))
     53 endif
     54 _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     55endef
     56
    4257endif
    4358
     
    10061021# Include the config.kmk we found file (or the default one).
    10071022ifdef KBUILD_PROFILE_SELF
    1008  _KBUILD_TS_NOW := $(nanots )
    1009  $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - including $(_CFGFILE))
    1010  $(info stat: $(make-stats ))
    1011  _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
    1012 
     1023 $(evalcall def_profile_self, including $(_CFGFILE))
    10131024 include $(_CFGFILE)
    1014 
    1015  _KBUILD_TS_NOW := $(nanots )
    1016  $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - included $(_CFGFILE))
    1017  $(info stat: $(make-stats ))
    1018  _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
     1025 $(evalcall def_profile_self, included $(_CFGFILE))
    10191026else
    10201027 include $(_CFGFILE)
     
    12041211
    12051212ifdef KBUILD_PROFILE_SELF
    1206  _KBUILD_TS_HEADER_END := $(nanots )
    1207  $(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)
    1208  $(info stat: $(make-stats ))
    1209  _KBUILD_TS_PREV := $(_KBUILD_TS_HEADER_END)
     1213 $(evalcall def_profile_self, end of header.kmk)
     1214 _KBUILD_TS_HEADER_END := $(_KBUILD_TS_PREV)
    12101215endif
    12111216
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