Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add debug level prefix for advanced logger memory message entries - Driver implementation #525

Merged

Conversation

liqiqiii
Copy link
Contributor

@liqiqiii liqiqiii commented Jul 19, 2024

Description

Add debug level prefix for advanced logger memory message entries - Driver implementation
This change added the existing metadata - debug level into the final
advanced logger memory entries through AdvancedFileLogger. This is a followup PR for 243bd18.
After this PR checked in, we can easily track the DEBUG_ERRORs through advanced logger files on UEFI that included this driver.
Added an extra space in the decodeuefilog.py to improve readability of the log.
For the for loop in the code, ran with perf_trace enabled, and influence is very low and can be ignored.
Updated the prefix of python script to match the design here.
Use [ERROR] instead of [DEBUG_ERROR], which could save overall log file sizes and memory buffer usage.

  • Impacts functionality?
    • Functionality - Does the change ultimately impact how firmware functions?
    • Examples: Add a new library, publish a new PPI, update an algorithm, ...
  • Impacts security?
    • Security - Does the change have a direct security impact on an application,
      flow, or firmware?
    • Examples: Crypto algorithm change, buffer overflow fix, parameter
      validation improvement, ...
  • Breaking change?
    • Breaking change - Will anyone consuming this change experience a break
      in build or boot behavior?
    • Examples: Add a new library class, move a module to a different repo, call
      a function in a new library class in a pre-existing module, ...
  • Includes tests?
    • Tests - Does the change include any explicit test code?
    • Examples: Unit tests, integration tests, robot tests, ...
  • Includes documentation?
    • Documentation - Does the change contain explicit documentation additions
      outside direct code modifications (and comments)?
    • Examples: Update readme file, add feature readme file, link to documentation
      on an a separate Web page, ...

How This Was Tested

Tested with two platforms that uses AdvancedFileLogger and can see debug level
prefixes in the logs in the EFI Partition and USB UefiLogs folder.
[MM_CORE] [ERROR] Image - MmSupervisorCore.pdb

Integration Instructions

N/A

@github-actions github-actions bot added language:python Pull requests that update Python code impact:non-functional Does not have a functional impact labels Jul 19, 2024
@os-d os-d requested a review from kuqin12 July 19, 2024 17:37
Copy link
Member

@makubacki makubacki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will cause some additional size but I'm okay to approve it if the tradeoff provides more value to platform debug.

@codecov-commenter
Copy link

codecov-commenter commented Aug 2, 2024

Codecov Report

Attention: Patch coverage is 0% with 100 lines in your changes missing coverage. Please review.

Project coverage is 11.01%. Comparing base (6385ad0) to head (4380e20).

Files Patch % Lines
.../AdvancedLoggerAccessLib/AdvancedLoggerAccessLib.c 0.00% 100 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                 @@
##           release/202311     #525      +/-   ##
==================================================
- Coverage           11.04%   11.01%   -0.04%     
==================================================
  Files                 144      144              
  Lines               22019    22079      +60     
  Branches             2356     2356              
==================================================
  Hits                 2432     2432              
- Misses              19555    19615      +60     
  Partials               32       32              
Flag Coverage Δ
AdvLoggerPkg 3.59% <0.00%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kuqin12 kuqin12 removed the impact:non-functional Does not have a functional impact label Aug 2, 2024
@kuqin12 kuqin12 enabled auto-merge (squash) August 2, 2024 07:46
@kuqin12 kuqin12 merged commit f0c8e10 into microsoft:release/202311 Aug 2, 2024
32 checks passed
ProjectMuBot referenced this pull request in microsoft/mu_tiano_platforms Aug 7, 2024
Introduces 3 new commits in [Common/MU](https://github.com/microsoft/mu_plus.git).

<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/microsoft/mu_plus/commit/c052f426b79192cf3fded227af306a0ddf88f5c9">c052f4</a> pip: bump regex from 2024.5.15 to 2024.7.24 (<a href="https://github.com/microsoft/mu_plus/pull/534">#534</a>)</li>
<li><a href="https://github.com/microsoft/mu_plus/commit/6385ad045f017c305a38ba0a41a30fd181d8d3fe">6385ad</a> pip: bump edk2-pytool-library from 0.21.8 to 0.21.9 (<a href="https://github.com/microsoft/mu_plus/pull/535">#535</a>)</li>
<li><a href="https://github.com/microsoft/mu_plus/commit/f0c8e103815e12d6f9fade58ec0ee9467be0df55">f0c8e1</a> Add debug level prefix for advanced logger memory message entries - Driver implementation (<a href="https://github.com/microsoft/mu_plus/pull/525">#525</a>)</li>
</ul>
</details>

Signed-off-by: Project Mu Bot <[email protected]>
apop5 pushed a commit to apop5/mu_plus that referenced this pull request Aug 27, 2024
…e entries - Driver implementation (microsoft#525)

Add debug level prefix for advanced logger memory message entries -
Driver implementation
This change added the existing metadata - debug level into the final
advanced logger memory entries through AdvancedFileLogger. This is a
followup PR for
microsoft@243bd18.
After this PR checked in, we can easily track the DEBUG_ERRORs through
advanced logger files on UEFI that included this driver.
Added an extra space in the decodeuefilog.py to improve readability of
the log.
For the for loop in the code, ran with perf_trace enabled, and influence
is very low and can be ignored.
Updated the prefix of python script to match the design here.
Use [ERROR] instead of [DEBUG_ERROR], which could save overall log file
sizes and memory buffer usage.

- [x] Impacts functionality?
- **Functionality** - Does the change ultimately impact how firmware
functions?
- Examples: Add a new library, publish a new PPI, update an algorithm,
...
- [ ] Impacts security?
- **Security** - Does the change have a direct security impact on an
application,
    flow, or firmware?
  - Examples: Crypto algorithm change, buffer overflow fix, parameter
    validation improvement, ...
- [ ] Breaking change?
- **Breaking change** - Will anyone consuming this change experience a
break
    in build or boot behavior?
- Examples: Add a new library class, move a module to a different repo,
call
    a function in a new library class in a pre-existing module, ...
- [ ] Includes tests?
  - **Tests** - Does the change include any explicit test code?
  - Examples: Unit tests, integration tests, robot tests, ...
- [ ] Includes documentation?
- **Documentation** - Does the change contain explicit documentation
additions
    outside direct code modifications (and comments)?
- Examples: Update readme file, add feature readme file, link to
documentation
    on an a separate Web page, ...

Tested with two platforms that uses AdvancedFileLogger and can see debug
level
prefixes in the logs in the EFI Partition and USB UefiLogs folder.
[MM_CORE] [ERROR] Image - MmSupervisorCore.pdb

N/A
apop5 pushed a commit that referenced this pull request Aug 27, 2024
…e entries - Driver implementation (#525)

Add debug level prefix for advanced logger memory message entries -
Driver implementation
This change added the existing metadata - debug level into the final
advanced logger memory entries through AdvancedFileLogger. This is a
followup PR for
243bd18.
After this PR checked in, we can easily track the DEBUG_ERRORs through
advanced logger files on UEFI that included this driver.
Added an extra space in the decodeuefilog.py to improve readability of
the log.
For the for loop in the code, ran with perf_trace enabled, and influence
is very low and can be ignored.
Updated the prefix of python script to match the design here.
Use [ERROR] instead of [DEBUG_ERROR], which could save overall log file
sizes and memory buffer usage.

- [x] Impacts functionality?
- **Functionality** - Does the change ultimately impact how firmware
functions?
- Examples: Add a new library, publish a new PPI, update an algorithm,
...
- [ ] Impacts security?
- **Security** - Does the change have a direct security impact on an
application,
    flow, or firmware?
  - Examples: Crypto algorithm change, buffer overflow fix, parameter
    validation improvement, ...
- [ ] Breaking change?
- **Breaking change** - Will anyone consuming this change experience a
break
    in build or boot behavior?
- Examples: Add a new library class, move a module to a different repo,
call
    a function in a new library class in a pre-existing module, ...
- [ ] Includes tests?
  - **Tests** - Does the change include any explicit test code?
  - Examples: Unit tests, integration tests, robot tests, ...
- [ ] Includes documentation?
- **Documentation** - Does the change contain explicit documentation
additions
    outside direct code modifications (and comments)?
- Examples: Update readme file, add feature readme file, link to
documentation
    on an a separate Web page, ...

Tested with two platforms that uses AdvancedFileLogger and can see debug
level
prefixes in the logs in the EFI Partition and USB UefiLogs folder.
[MM_CORE] [ERROR] Image - MmSupervisorCore.pdb

N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language:python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants