Index: trunk/kBuild/footer.kmk
===================================================================
--- trunk/kBuild/footer.kmk	(revision 987)
+++ trunk/kBuild/footer.kmk	(revision 988)
@@ -27,4 +27,9 @@
 ifndef __footer_kmk__
 # start-of-file-content
+ifdef KBUILD_PROFILE_SELF
+ _KBUILD_TS_FOOTER_START := $(nanots )
+ $(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)
+ _KBUILD_TS_PREV := $(_KBUILD_TS_FOOTER_START)
+endif
 
 #
@@ -306,4 +311,10 @@
 # $ (warning dbg _KEYWORDS := $(_KEYWORDS))
 
+ifdef KBUILD_PROFILE_SELF
+ _KBUILD_TS_NOW := $(nanots )
+ $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done keywords)
+ _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
+endif
+
 
 #
@@ -358,4 +369,10 @@
 $(foreach trg, $(_ALL_INSTALLS),$(eval $(value def_inherit)))
 
+ifdef KBUILD_PROFILE_SELF
+ _KBUILD_TS_NOW := $(nanots )
+ $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done target inheritance)
+ _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
+endif
+
 
 #
@@ -380,4 +397,10 @@
 properties_now :=
 properties_deferred :=
+
+ifdef KBUILD_PROFILE_SELF
+ _KBUILD_TS_NOW := $(nanots )
+ $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done template inheritance)
+ _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
+endif
 
 
@@ -558,4 +581,10 @@
 bld_trg_cpu := $(BUILD_PLATFORM_CPU)
 $(foreach target, $(_ALL_BUILD_PLATFORM_TARGETS),$(eval $(value def_inherit_template)))
+
+ifdef KBUILD_PROFILE_SELF
+ _KBUILD_TS_NOW := $(nanots )
+ $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done common inheritance)
+ _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
+endif
 
 
@@ -687,4 +716,10 @@
 ## @todo Execute SDKS and TOOL inhertiance.
 
+ifdef KBUILD_PROFILE_SELF
+ _KBUILD_TS_NOW := $(nanots )
+ $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done tools and sdks)
+ _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
+endif
+
 
 #
@@ -870,4 +905,10 @@
 $(foreach target, $(INSTALLS) $(INSTALLS.$(BUILD_TARGET)) $(INSTALLS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)), \
 	$(eval $(value def_pass1_install)))
+
+ifdef KBUILD_PROFILE_SELF
+ _KBUILD_TS_NOW := $(nanots )
+ $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done pass 1)
+ _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
+endif
 
 
@@ -1258,4 +1299,10 @@
 fetch: $(_FETCHES)
 unfetch: $(_UNFETCHES)
+
+ifdef KBUILD_PROFILE_SELF
+ _KBUILD_TS_NOW := $(nanots )
+ $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done fetching targets)
+ _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
+endif
 
 
@@ -1673,4 +1720,10 @@
 mode := 0644
 $(foreach target, $(LIBRARIES) $(LIBRARIES.$(BUILD_TARGET)) $(LIBRARIES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)), $(eval $(value def_lib)))
+
+ifdef KBUILD_PROFILE_SELF
+ _KBUILD_TS_NOW := $(nanots )
+ $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done library targets)
+ _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
+endif
 
 
@@ -2020,4 +2073,9 @@
 $(foreach target, $(BLDPROGS) $(BLDPROGS.$(BUILD_PLATFORM)) $(BLDPROGS.$(BUILD_PLATFORM).$(BUILD_PLATFORM_ARCH)), $(eval $(value def_bldprog)))
 
+ifdef KBUILD_PROFILE_SELF
+ _KBUILD_TS_NOW := $(nanots )
+ $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done build program targets)
+ _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
+endif
 
 
@@ -2035,4 +2093,10 @@
 bld_trg_base_var := TARGET
 $(foreach target, $(DLLS) $(DLLS.$(BUILD_TARGET)) $(DLLS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)), $(eval $(value def_link_common)))
+
+ifdef KBUILD_PROFILE_SELF
+ _KBUILD_TS_NOW := $(nanots )
+ $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done dll targets)
+ _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
+endif
 
 
@@ -2059,4 +2123,10 @@
 endif
 
+ifdef KBUILD_PROFILE_SELF
+ _KBUILD_TS_NOW := $(nanots )
+ $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done import library targets)
+ _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
+endif
+
 
 #
@@ -2074,4 +2144,9 @@
 $(foreach target, $(PROGRAMS) $(PROGRAMS.$(BUILD_TARGET)) $(PROGRAMS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)), $(eval $(value def_link_common)))
 
+ifdef KBUILD_PROFILE_SELF
+ _KBUILD_TS_NOW := $(nanots )
+ $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done program targets)
+ _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
+endif
 
 
@@ -2089,4 +2164,10 @@
 bld_trg_base_var := TARGET
 $(foreach target, $(SYSMODS) $(SYSMODS.$(BUILD_TARGET)) $(SYSMODS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)), $(eval $(value def_link_common)))
+
+ifdef KBUILD_PROFILE_SELF
+ _KBUILD_TS_NOW := $(nanots )
+ $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done sysmod targets)
+ _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
+endif
 
 
@@ -2401,4 +2482,10 @@
 	$(eval $(value def_install)))
 
+ifdef KBUILD_PROFILE_SELF
+ _KBUILD_TS_NOW := $(nanots )
+ $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done install targets)
+ _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
+endif
+
 
 #
@@ -2428,4 +2515,10 @@
 $(foreach directory,$(_DIR_ALL),$(eval $(def_mkdir_rule)))
 
+ifdef KBUILD_PROFILE_SELF
+ _KBUILD_TS_NOW := $(nanots )
+ $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done directories)
+ _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
+endif
+
 
 #
@@ -2433,4 +2526,7 @@
 #
 do-nothing:
+ifdef KBUILD_PROFILE_SELF
+	@$(ECHO) 'prof: $(int-sub $(nanots ), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(nanots ), $(_KBUILD_TS_PREV)) - executing $@'
+endif
 	$(call MSG_NOTHING)
 
@@ -2572,4 +2668,9 @@
 	$(eval $(def_pass_order)))
 
+ifdef KBUILD_PROFILE_SELF
+ _KBUILD_TS_NOW := $(nanots )
+ $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done passes)
+ _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
+endif
 
 
@@ -2633,4 +2734,11 @@
 
 
+ifdef KBUILD_PROFILE_SELF
+ _KBUILD_TS_FOOTER_END := $(nanots )
+ $(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)
+ $(info prof: footer.kmk: $(int-sub $(_KBUILD_TS_FOOTER_END), $(_KBUILD_TS_FOOTER_START)))
+ _KBUILD_TS_PREV := $(_KBUILD_TS_FOOTER_END)
+endif
+
 # end-of-file-content
 __footer_kmk__ := target
Index: trunk/kBuild/header.kmk
===================================================================
--- trunk/kBuild/header.kmk	(revision 987)
+++ trunk/kBuild/header.kmk	(revision 988)
@@ -27,4 +27,10 @@
 ifndef __header_kmk__
 # start-of-file-content
+ifdef KBUILD_PROFILE_SELF
+ _KBUILD_TS_HEADER_START := $(nanots ) # just a dummy warm up query
+ $(info prof: since start - since previous - event description)
+ _KBUILD_TS_HEADER_START := $(nanots )
+ _KBUILD_TS_PREV := $(_KBUILD_TS_HEADER_START)
+endif
 
 
@@ -799,5 +805,18 @@
 
 # Include the config.kmk we found file (or the default one).
-include $(_CFGFILE)
+ifdef KBUILD_PROFILE_SELF
+ _KBUILD_TS_NOW := $(nanots )
+ $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - including $(_CFGFILE))
+ _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
+
+ include $(_CFGFILE)
+
+ _KBUILD_TS_NOW := $(nanots )
+ $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - included $(_CFGFILE))
+ _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
+else
+ include $(_CFGFILE)
+endif
+
 
 
@@ -963,4 +982,10 @@
 
 
+ifdef KBUILD_PROFILE_SELF
+ _KBUILD_TS_HEADER_END := $(nanots )
+ $(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)
+ _KBUILD_TS_PREV := $(_KBUILD_TS_HEADER_END)
+endif
+
 # end-of-file-content
 __header_kmk__ := 1
