Changeset 2008 in kBuild
- Timestamp:
- Oct 31, 2008 3:55:06 AM (16 years ago)
- Location:
- trunk/kBuild
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/footer.kmk
r2007 r2008 35 35 # start-of-file-content 36 36 ifdef 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) 41 39 endif 42 40 … … 849 847 850 848 ifdef 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) 855 850 endif 856 851 … … 930 925 931 926 ifdef 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) 936 928 endif 937 929 … … 969 961 970 962 ifdef 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) 975 964 endif 976 965 … … 1173 1162 1174 1163 ifdef 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) 1179 1165 endif 1180 1166 … … 1356 1342 1357 1343 ifdef 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) 1362 1345 endif 1363 1346 … … 1569 1552 1570 1553 ifdef 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) 1575 1555 endif 1576 1556 … … 1972 1952 1973 1953 ifdef 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) 1978 1955 endif 1979 1956 … … 2491 2468 2492 2469 ifdef 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) 2497 2471 endif 2498 2472 … … 2916 2890 2917 2891 ifdef 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) 2922 2893 endif 2923 2894 … … 2938 2909 2939 2910 ifdef 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) 2944 2912 endif 2945 2913 … … 2968 2936 2969 2937 ifdef 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) 2974 2939 endif 2975 2940 … … 2990 2955 2991 2956 ifdef 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) 2996 2958 endif 2997 2959 … … 3012 2974 3013 2975 ifdef 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) 3018 2977 endif 3019 2978 … … 3354 3313 3355 3314 ifdef 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) 3360 3316 endif 3361 3317 … … 3393 3349 3394 3350 ifdef 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) 3399 3352 endif 3400 3353 … … 3404 3357 # 3405 3358 do-nothing: 3359 %$(call MSG_NOTHING) 3406 3360 ifdef 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) 3408 3363 @$(ECHO) 'stat: $(make-stats )' 3409 endif3410 %$(call MSG_NOTHING) 3364 endif 3365 endif 3411 3366 3412 3367 … … 3592 3547 3593 3548 ifdef 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) 3598 3550 endif 3599 3551 … … 3668 3620 3669 3621 ifdef 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 3679 3631 endif 3680 3632 -
trunk/kBuild/header.kmk
r1782 r2008 36 36 ifdef KBUILD_PROFILE_SELF 37 37 _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 40 42 _KBUILD_TS_HEADER_START := $(nanots ) 41 43 _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 48 define 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) 55 endef 56 42 57 endif 43 58 … … 1006 1021 # Include the config.kmk we found file (or the default one). 1007 1022 ifdef 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)) 1013 1024 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)) 1019 1026 else 1020 1027 include $(_CFGFILE) … … 1204 1211 1205 1212 ifdef 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) 1210 1215 endif 1211 1216
Note:
See TracChangeset
for help on using the changeset viewer.