[edk2] [Patch] Build Spec: Build report to display every module's build time

Yonghong Zhu posted 1 patch 7 years, 3 months ago
Failed in applying to current master (apply log)
13_build_reports/134_platform_summary.md |  8 +++++-
13_build_reports/138_module_section.md   | 43 +++++++++++++++++++-------------
README.md                                |  1 +
3 files changed, 34 insertions(+), 18 deletions(-)
[edk2] [Patch] Build Spec: Build report to display every module's build time
Posted by Yonghong Zhu 7 years, 3 months ago
fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=717
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Kevin W Shaw <kevin.w.shaw@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
---
 13_build_reports/134_platform_summary.md |  8 +++++-
 13_build_reports/138_module_section.md   | 43 +++++++++++++++++++-------------
 README.md                                |  1 +
 3 files changed, 34 insertions(+), 18 deletions(-)

diff --git a/13_build_reports/134_platform_summary.md b/13_build_reports/134_platform_summary.md
index 0674141..083d714 100644
--- a/13_build_reports/134_platform_summary.md
+++ b/13_build_reports/134_platform_summary.md
@@ -41,10 +41,13 @@ following items:
 * Tool Chain : %Tool chain string%
 * Target : %Target String"
 * Output Path : %Path to platform build directory%
 * Build Environment : %Environment string reported by Python%
 * Build Duration : %Build duration time string%
+* AutoGen Duration : %AutoGen duration time string if it exists%
+* Make Duration : %Make duration time string if it exists%
+* GenFds Duration : %GenFds duration time string if it exists%
 * Report Content : %List of flags the control the report content%
 
 #### Example
 
 ```
@@ -53,11 +56,14 @@ Platform DSC Path:  s:\edk2\Nt32Pkg\Nt32Pkg.dsc
 Architectures:      IA32
 Tool Chain:         VS2008x86
 Target:             DEBUG
 Output Path:        s:\edk2\Build\NT32IA32
 Build Environment:  Windows-7-6.1.7601-SP1
-Build Duration:     00:01:53
+Build Duration:     00:01:29
+AutoGen Duration:   00:00:10
+Make Duration:      00:01:02
+GenFds Duration:    00:00:15
 Report Contents:    PCD, LIBRARY, BUILD_FLAGS, DEPEX, FLASH, FIXED_ADDRESS
 ```
 
 **********
 **Note:** Platform Summary is always present and appears at the beginning of
diff --git a/13_build_reports/138_module_section.md b/13_build_reports/138_module_section.md
index d4aa365..455537b 100644
--- a/13_build_reports/138_module_section.md
+++ b/13_build_reports/138_module_section.md
@@ -45,10 +45,11 @@ file GUID, module size, module build time stamp and driver type.
 * Module INF Path: %Path of Module INF file%
 * File GUID: %Module GUID: '`FILE_GUID`' in INF `[Defines]` section%
 * Size: %Module EFI image size%
 * Build time stamp: %The time stamp in module PE32 image% (If the time stamp is
   cleared to be zero, the build time stamp is 1970-01-01 00:00:00 UTC time.)
+* Module Build Time: %The time string for this module's build%
 * Driver Type: %The driver's file type code[^2] and name in firmware volume%
 
 The following entries are options:
 
 * If using defaults or the `HASH` flag is specified:
@@ -77,10 +78,11 @@ Module Name:        SmbiosDxe
 Module INF Path:    MdeModule\Universal\SmbiosDxe\SmbiosDxe.inf
 File GUID:          F9D88642-0737-49BC-81B5-6889CD57D9EA
 Size:               0x7000 (28.00K)
 SHA1 HASH:          d94c3f180f25d6b562f477bc4a16b286cb66a8b6 *SmbiosDxe.efi
 Build Time Stamp:   1969-12-31 16:00:00
+Module Build Time:  1060ms
 Driver Type:        0x7 (DRIVER)
 ============================================================================
 ... (Module Section Details for SmbiosDxe)
 <==========================================================================>
 ```
@@ -94,10 +96,11 @@ Module Name:        EbcDxe
 Module INF Path:    MdeModule\Universal\EbcDxe\EbcDxe.inf
 File GUID:          13AC6DD0-73D0-11D4-B06B-00AA00BD6DE7
 Size:               0x9000 (36.00K)
 SHA1 HASH:          ff4c019345614afe5c88e7fc37219c30a07f4af4 *EbcDxe.efi
 Time Stamp:         1969-12-31 16:00:00
+Module Build Time:  1731ms
 Driver Type:        0x7 (DRIVER)
 ============================================================================
 ... (Module Section Details for EbcDxe)
 
 <==========================================================================>
@@ -114,10 +117,11 @@ destructor calling sequence.
 
 * Library INF Path: Path of library instance INF file
 * Class\*: The library class name of the library instance
 * C\*: The library constructor if it exists
 * D\*: The library destructor if it exists
+* Time: The build time of this library if it exists
 
 The items marked with \* are only available when the module is an EDKII style
 module and they must be listed in the next line immediately after library
 instance's INF path.
 
@@ -141,50 +145,55 @@ format is:
      inserted in the curly braces before the closing curly brace.
      ```
      D = DestructorCname
      ```
 
+   * Display the build time.
+     ```
+     Time = TimeString
+     ```
+
 #### Example1:
 
 ```c
 >--------------------------------------------------------------------------<
 Library
 ---------------------------------------------------------------------------
 s:\edk2\MdePkg\Library\UefiDevicePathLib\UefiDevicePathLib.inf
-{DevicePathLib}
+{DevicePathLib: Time = 643ms}
 s:\edk2\MdePkg\Library\BaseLib\BaseLib.inf
-{BaseLib}
+{BaseLib: Time = 14702ms}
 s:\edk2\MdePkg\Library\BaseMemoryLib\BaseMemoryLib.inf
-{BaseMemoryLib}
+{BaseMemoryLib: Time = 284ms}
 s:\edk2\MdePkg\Library\UefiMemoryAllocationLib\UefiMemoryAllocationLib.inf
-{MemoryAllocationLib}
+{MemoryAllocationLib: Time = 249ms}
 s:\edk2\MdePkg\Library\UefiBootServicesTableLib\UefiBootServicesTableLib.inf
-{UefiBootServicesTableLib: C = UefiBootServicesTableLibConstructor}
+{UefiBootServicesTableLib: C = UefiBootServicesTableLibConstructor Time = 219ms}
 s:\edk2\MdePkg\Library\DxePcdLib\DxePcdLib.inf
-{PcdLib: C = PcdLibConstructor}
+{PcdLib: C = PcdLibConstructor Time = 265ms}
 s:\edk2\MdePkg\Library\UefiRuntimeServicesTableLib\UefiRuntimeServicesTableLib.inf
-{UefiRuntimeServicesTableLib: C = UefiRuntimeServicesLibConstructor}
+{UefiRuntimeServicesTableLib: C = UefiRuntimeServicesLibConstructor Time = 203ms}
 s:\edk2\MdePkg\Library\BaseIoLibIntrinsic\BaseIoLibIntrinsic.inf
-{IoLib}
+{IoLib: Time = 702ms}
 s:\edk2\MdePkg\Library\BasePciCf8Lib\BasePciCf8Lib.inf
-{PciCf8Lib}
+{PciCf8Lib: Time = 345ms}
 s:\edk2\MdePkg\Library\BasePciLibCf8\BasePciLibCf8.inf
-{PciLib}
+{PciLib: Time = 341ms}
 s:\edk2\MdePkg\Library\BasePrintLib\BasePrintLib.inf
-{PrintLib}
+{PrintLib: Time = 312ms}
 s:\edk2\Ich9Pkg\Library\IntelIchAcpiTimerLib\IntelIchAcpiTimerLib.inf
-{TimerLib: C = IntelAcpiTimerLibConstructor}
+{TimerLib: C = IntelAcpiTimerLibConstructor Time = 282ms}
 s:\edk2\MdePkg\Library\UefiLib\UefiLib.inf
-{UefiLib}
+{UefiLib: Time = 733ms}
 s:\edk2\MdePkg\Library\BaseSynchronizationLib\BaseSynchronizationLib.inf
-{SynchronizationLib}
+{SynchronizationLib: Time = 920ms}
 s:\edk2\MdePkg\Library\DxeHobLib\DxeHobLib.inf
-{HobLib: C = DxeHobLibConstructor}
+{HobLib: C = DxeHobLibConstructor Time = 218ms}
 s:\edk2\MdePkg\Library\UefiDriverEntryPoint\UefiDriverEntryPoint.inf
-{UefiDriverEntryPoint}
+{UefiDriverEntryPoint Time = 234ms}
 s:\edk2\MdePkg\Library\UefiRuntimeLib\UefiRuntimeLib.inf
-{UefiRuntimeLib: C = UefiRuntimeLibConstructor D = UefiRuntimeLibDestructor}
+{UefiRuntimeLib: C = UefiRuntimeLibConstructor D = UefiRuntimeLibDestructor Time = 265ms}
 <-------------------------------------------------------------------------->
 ```
 
 #### Example2:
 
diff --git a/README.md b/README.md
index 52abb6a..f174aed 100644
--- a/README.md
+++ b/README.md
@@ -215,5 +215,6 @@ Copyright (c) 2008-2017, Intel Corporation. All rights reserved.
 |            | [#523](https://bugzilla.tianocore.org/show_bug.cgi?id=523) Build spec: add EBNF for the --pcd syntax in the Section D.4                                                                                                                                                                                                                                             |               |
 |            | [#517](https://bugzilla.tianocore.org/show_bug.cgi?id=517) Build spec: chapter 5.2.2 Guided Tools add description for Pkcs7Sign tool and BrotliCompress tool                                                                                                                                                                                                        |               |
 |            | [#481](https://bugzilla.tianocore.org/show_bug.cgi?id=481) Build Spec: add clarification for not used Pcd that build tool will not do additional checks on its value                                                                                                                                                                                                |               |
 |            | [#518](https://bugzilla.tianocore.org/show_bug.cgi?id=518) Build Spec: Update Precedence of PCD Values                                                                                                                                                                                                                                                              |               |
 |            | [#669](https://bugzilla.tianocore.org/show_bug.cgi?id=669) Build Spec: Add multi-arg support to PREBUILD/POSTBUILD                                                                                                                                                                                                                                                  |               |
+|            | [#717](https://bugzilla.tianocore.org/show_bug.cgi?id=717) Build Spec: Build report to display every module's build time                                                                                                                                                                                                                                            |               |
-- 
2.6.1.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] Build Spec: Build report to display every module's build time
Posted by Gao, Liming 7 years, 3 months ago
Reviewed-by: Liming Gao <liming.gao@intel.com>

> -----Original Message-----
> From: Zhu, Yonghong
> Sent: Monday, September 25, 2017 10:34 AM
> To: edk2-devel@lists.01.org
> Cc: Gao, Liming <liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Shaw, Kevin W <kevin.w.shaw@intel.com>
> Subject: [Patch] Build Spec: Build report to display every module's build time
> 
> fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=717
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Michael Kinney <michael.d.kinney@intel.com>
> Cc: Kevin W Shaw <kevin.w.shaw@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
> ---
>  13_build_reports/134_platform_summary.md |  8 +++++-
>  13_build_reports/138_module_section.md   | 43 +++++++++++++++++++-------------
>  README.md                                |  1 +
>  3 files changed, 34 insertions(+), 18 deletions(-)
> 
> diff --git a/13_build_reports/134_platform_summary.md b/13_build_reports/134_platform_summary.md
> index 0674141..083d714 100644
> --- a/13_build_reports/134_platform_summary.md
> +++ b/13_build_reports/134_platform_summary.md
> @@ -41,10 +41,13 @@ following items:
>  * Tool Chain : %Tool chain string%
>  * Target : %Target String"
>  * Output Path : %Path to platform build directory%
>  * Build Environment : %Environment string reported by Python%
>  * Build Duration : %Build duration time string%
> +* AutoGen Duration : %AutoGen duration time string if it exists%
> +* Make Duration : %Make duration time string if it exists%
> +* GenFds Duration : %GenFds duration time string if it exists%
>  * Report Content : %List of flags the control the report content%
> 
>  #### Example
> 
>  ```
> @@ -53,11 +56,14 @@ Platform DSC Path:  s:\edk2\Nt32Pkg\Nt32Pkg.dsc
>  Architectures:      IA32
>  Tool Chain:         VS2008x86
>  Target:             DEBUG
>  Output Path:        s:\edk2\Build\NT32IA32
>  Build Environment:  Windows-7-6.1.7601-SP1
> -Build Duration:     00:01:53
> +Build Duration:     00:01:29
> +AutoGen Duration:   00:00:10
> +Make Duration:      00:01:02
> +GenFds Duration:    00:00:15
>  Report Contents:    PCD, LIBRARY, BUILD_FLAGS, DEPEX, FLASH, FIXED_ADDRESS
>  ```
> 
>  **********
>  **Note:** Platform Summary is always present and appears at the beginning of
> diff --git a/13_build_reports/138_module_section.md b/13_build_reports/138_module_section.md
> index d4aa365..455537b 100644
> --- a/13_build_reports/138_module_section.md
> +++ b/13_build_reports/138_module_section.md
> @@ -45,10 +45,11 @@ file GUID, module size, module build time stamp and driver type.
>  * Module INF Path: %Path of Module INF file%
>  * File GUID: %Module GUID: '`FILE_GUID`' in INF `[Defines]` section%
>  * Size: %Module EFI image size%
>  * Build time stamp: %The time stamp in module PE32 image% (If the time stamp is
>    cleared to be zero, the build time stamp is 1970-01-01 00:00:00 UTC time.)
> +* Module Build Time: %The time string for this module's build%
>  * Driver Type: %The driver's file type code[^2] and name in firmware volume%
> 
>  The following entries are options:
> 
>  * If using defaults or the `HASH` flag is specified:
> @@ -77,10 +78,11 @@ Module Name:        SmbiosDxe
>  Module INF Path:    MdeModule\Universal\SmbiosDxe\SmbiosDxe.inf
>  File GUID:          F9D88642-0737-49BC-81B5-6889CD57D9EA
>  Size:               0x7000 (28.00K)
>  SHA1 HASH:          d94c3f180f25d6b562f477bc4a16b286cb66a8b6 *SmbiosDxe.efi
>  Build Time Stamp:   1969-12-31 16:00:00
> +Module Build Time:  1060ms
>  Driver Type:        0x7 (DRIVER)
>  ============================================================================
>  ... (Module Section Details for SmbiosDxe)
>  <==========================================================================>
>  ```
> @@ -94,10 +96,11 @@ Module Name:        EbcDxe
>  Module INF Path:    MdeModule\Universal\EbcDxe\EbcDxe.inf
>  File GUID:          13AC6DD0-73D0-11D4-B06B-00AA00BD6DE7
>  Size:               0x9000 (36.00K)
>  SHA1 HASH:          ff4c019345614afe5c88e7fc37219c30a07f4af4 *EbcDxe.efi
>  Time Stamp:         1969-12-31 16:00:00
> +Module Build Time:  1731ms
>  Driver Type:        0x7 (DRIVER)
>  ============================================================================
>  ... (Module Section Details for EbcDxe)
> 
>  <==========================================================================>
> @@ -114,10 +117,11 @@ destructor calling sequence.
> 
>  * Library INF Path: Path of library instance INF file
>  * Class\*: The library class name of the library instance
>  * C\*: The library constructor if it exists
>  * D\*: The library destructor if it exists
> +* Time: The build time of this library if it exists
> 
>  The items marked with \* are only available when the module is an EDKII style
>  module and they must be listed in the next line immediately after library
>  instance's INF path.
> 
> @@ -141,50 +145,55 @@ format is:
>       inserted in the curly braces before the closing curly brace.
>       ```
>       D = DestructorCname
>       ```
> 
> +   * Display the build time.
> +     ```
> +     Time = TimeString
> +     ```
> +
>  #### Example1:
> 
>  ```c
>  >--------------------------------------------------------------------------<
>  Library
>  ---------------------------------------------------------------------------
>  s:\edk2\MdePkg\Library\UefiDevicePathLib\UefiDevicePathLib.inf
> -{DevicePathLib}
> +{DevicePathLib: Time = 643ms}
>  s:\edk2\MdePkg\Library\BaseLib\BaseLib.inf
> -{BaseLib}
> +{BaseLib: Time = 14702ms}
>  s:\edk2\MdePkg\Library\BaseMemoryLib\BaseMemoryLib.inf
> -{BaseMemoryLib}
> +{BaseMemoryLib: Time = 284ms}
>  s:\edk2\MdePkg\Library\UefiMemoryAllocationLib\UefiMemoryAllocationLib.inf
> -{MemoryAllocationLib}
> +{MemoryAllocationLib: Time = 249ms}
>  s:\edk2\MdePkg\Library\UefiBootServicesTableLib\UefiBootServicesTableLib.inf
> -{UefiBootServicesTableLib: C = UefiBootServicesTableLibConstructor}
> +{UefiBootServicesTableLib: C = UefiBootServicesTableLibConstructor Time = 219ms}
>  s:\edk2\MdePkg\Library\DxePcdLib\DxePcdLib.inf
> -{PcdLib: C = PcdLibConstructor}
> +{PcdLib: C = PcdLibConstructor Time = 265ms}
>  s:\edk2\MdePkg\Library\UefiRuntimeServicesTableLib\UefiRuntimeServicesTableLib.inf
> -{UefiRuntimeServicesTableLib: C = UefiRuntimeServicesLibConstructor}
> +{UefiRuntimeServicesTableLib: C = UefiRuntimeServicesLibConstructor Time = 203ms}
>  s:\edk2\MdePkg\Library\BaseIoLibIntrinsic\BaseIoLibIntrinsic.inf
> -{IoLib}
> +{IoLib: Time = 702ms}
>  s:\edk2\MdePkg\Library\BasePciCf8Lib\BasePciCf8Lib.inf
> -{PciCf8Lib}
> +{PciCf8Lib: Time = 345ms}
>  s:\edk2\MdePkg\Library\BasePciLibCf8\BasePciLibCf8.inf
> -{PciLib}
> +{PciLib: Time = 341ms}
>  s:\edk2\MdePkg\Library\BasePrintLib\BasePrintLib.inf
> -{PrintLib}
> +{PrintLib: Time = 312ms}
>  s:\edk2\Ich9Pkg\Library\IntelIchAcpiTimerLib\IntelIchAcpiTimerLib.inf
> -{TimerLib: C = IntelAcpiTimerLibConstructor}
> +{TimerLib: C = IntelAcpiTimerLibConstructor Time = 282ms}
>  s:\edk2\MdePkg\Library\UefiLib\UefiLib.inf
> -{UefiLib}
> +{UefiLib: Time = 733ms}
>  s:\edk2\MdePkg\Library\BaseSynchronizationLib\BaseSynchronizationLib.inf
> -{SynchronizationLib}
> +{SynchronizationLib: Time = 920ms}
>  s:\edk2\MdePkg\Library\DxeHobLib\DxeHobLib.inf
> -{HobLib: C = DxeHobLibConstructor}
> +{HobLib: C = DxeHobLibConstructor Time = 218ms}
>  s:\edk2\MdePkg\Library\UefiDriverEntryPoint\UefiDriverEntryPoint.inf
> -{UefiDriverEntryPoint}
> +{UefiDriverEntryPoint Time = 234ms}
>  s:\edk2\MdePkg\Library\UefiRuntimeLib\UefiRuntimeLib.inf
> -{UefiRuntimeLib: C = UefiRuntimeLibConstructor D = UefiRuntimeLibDestructor}
> +{UefiRuntimeLib: C = UefiRuntimeLibConstructor D = UefiRuntimeLibDestructor Time = 265ms}
>  <-------------------------------------------------------------------------->
>  ```
> 
>  #### Example2:
> 
> diff --git a/README.md b/README.md
> index 52abb6a..f174aed 100644
> --- a/README.md
> +++ b/README.md
> @@ -215,5 +215,6 @@ Copyright (c) 2008-2017, Intel Corporation. All rights reserved.
>  |            | [#523](https://bugzilla.tianocore.org/show_bug.cgi?id=523) Build spec: add EBNF for the --pcd syntax in the Section
> D.4
> |               |
>  |            | [#517](https://bugzilla.tianocore.org/show_bug.cgi?id=517) Build spec: chapter 5.2.2 Guided Tools add description
> for Pkcs7Sign tool and BrotliCompress tool
> |               |
>  |            | [#481](https://bugzilla.tianocore.org/show_bug.cgi?id=481) Build Spec: add clarification for not used Pcd that build
> tool will not do additional checks on its value
> |               |
>  |            | [#518](https://bugzilla.tianocore.org/show_bug.cgi?id=518) Build Spec: Update Precedence of PCD Values
> |               |
>  |            | [#669](https://bugzilla.tianocore.org/show_bug.cgi?id=669) Build Spec: Add multi-arg support to
> PREBUILD/POSTBUILD
> |               |
> +|            | [#717](https://bugzilla.tianocore.org/show_bug.cgi?id=717) Build Spec: Build report to display every module's build
> time
> |               |
> --
> 2.6.1.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel