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

chore: Address profiler warnings #2545

Merged
merged 5 commits into from
Jun 14, 2024
Merged

Conversation

chynesNR
Copy link
Member

@chynesNR chynesNR commented Jun 12, 2024

This addresses a number of compiler and linter warnings in the Profiler:

  • Moved some large XML objects from stack to heap. Since XML parsing isn't done during instrumentation it feels like a safe change.
  • Made a number of member functions const
  • Addressed a number of uninitialized variables (They were all set before use; this is just to make the compiler happy)
  • Disabled warnings for a couple of the CoreCLR headers that we include but are not owned by the profiler.
  • Changed a lot of loop iterators from auto to auto&, to avoid an unnecessary copy. This could in theory result in a behavior change but I don't think any of them were deliberate.

There are still a few linter warnings that I don't want to change (e.g. in the CoreClr headers), but Visual Studio doesn't have a way to exclude files from lint.

All unit and integration tests are passing with the new Profiler.

@chynesNR chynesNR marked this pull request as ready for review June 13, 2024 17:40
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 96.29630% with 1 line in your changes missing coverage. Please review.

Project coverage is 80.58%. Comparing base (332529b) to head (7c5b151).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2545      +/-   ##
==========================================
+ Coverage   80.49%   80.58%   +0.09%     
==========================================
  Files         459      459              
  Lines       28873    28927      +54     
  Branches     3167     3177      +10     
==========================================
+ Hits        23240    23311      +71     
+ Misses       4846     4825      -21     
- Partials      787      791       +4     
Flag Coverage Δ
Agent 81.47% <ø> (+<0.01%) ⬆️
Profiler 72.59% <96.29%> (+0.87%) ⬆️

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

Files Coverage Δ
...nt/NewRelic/Profiler/Configuration/Configuration.h 82.69% <100.00%> (+7.69%) ⬆️
...lic/Profiler/Configuration/IgnoreInstrumentation.h 100.00% <ø> (ø)
...filer/Configuration/InstrumentationConfiguration.h 93.11% <100.00%> (-0.13%) ⬇️
...elic/Profiler/Configuration/InstrumentationPoint.h 100.00% <ø> (ø)
...filer/MethodRewriter/ExceptionHandlerManipulator.h 73.91% <100.00%> (-0.38%) ⬇️
...elic/Profiler/MethodRewriter/FunctionManipulator.h 51.40% <ø> (ø)
.../NewRelic/Profiler/MethodRewriter/InstructionSet.h 55.48% <100.00%> (ø)
...ler/MethodRewriter/InstrumentFunctionManipulator.h 94.78% <100.00%> (+0.09%) ⬆️
.../NewRelic/Profiler/MethodRewriter/MethodRewriter.h 94.73% <100.00%> (-0.14%) ⬇️
...rc/Agent/NewRelic/Profiler/SignatureParser/Types.h 62.04% <75.00%> (+0.05%) ⬆️

... and 6 files with indirect coverage changes

@chynesNR chynesNR merged commit e41880d into main Jun 14, 2024
93 checks passed
@chynesNR chynesNR deleted the chore/address-profiler-warnings branch June 14, 2024 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants