Skip to content

[PROF-10688] Remove a looping allocation when updating threads - #135

Merged
jbachorik merged 2 commits into
mainfrom
r1viollet/fix_looping_allocation
Oct 11, 2024
Merged

jbachorik merged 2 commits into
mainfrom
r1viollet/fix_looping_allocation

Conversation

@r1viollet

Copy link
Copy Markdown
Contributor

What does this PR do?:

Remove a looping allocation when updating threads

Motivation:

I do not have numbers that would justify that this is important.

Additional Notes:

For long thread names we would still have an allocation in string creation, however we previously had 2 (as we copied the C string to the std::string)

How to test the change?:

For Datadog employees:

  • If this PR touches code that signs or publishes builds or packages, or handles
    credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.
  • JIRA: [JIRA-XXXX]

Unsure? Have a question? Request a review!

Comment thread ddprof-lib/src/main/cpp/threadInfo.cpp Resolved
@github-actions

github-actions Bot commented Oct 1, 2024 •

Copy link
Copy Markdown
Contributor

🔧 Report generated by pr-comment-scanbuild

Scan-Build Report

User:runner@fv-az1269-111
Working Directory:/home/runner/work/java-profiler/java-profiler/ddprof-lib/src/test/make
Command Line:make -j4 clean all
Clang Version:Ubuntu clang version 14.0.0-1ubuntu1.1
Date:Wed Oct 9 10:31:12 2024

Bug Summary

Bug TypeQuantityDisplay?
All Bugs5
Logic error
Assigned value is garbage or undefined1
Dereference of null pointer3
Unused code
Dead nested assignment1

Reports

Bug Group Bug Type ▾ File Function/Method Line Path Length
Logic errorAssigned value is garbage or undefineddwarf.cppparseInstructions24420
Unused codeDead nested assignmentvmStructs.cppcheckNativeBinding8791
Logic errorDereference of null pointersafeAccess.hload3318
Logic errorDereference of null pointersymbols_linux.hElfParser12932
Logic errorDereference of null pointerflightRecorder.cppflush15048

@github-actions

github-actions Bot commented Oct 1, 2024 •

Copy link
Copy Markdown
Contributor

🔧 Report generated by pr-comment-cppcheck

CppCheck Report

Warnings (6)

Style Violations (160)

Comment thread ddprof-lib/src/main/cpp/profiler.cpp Resolved
Comment thread ddprof-lib/src/main/cpp/profiler.cpp Resolved
Comment thread ddprof-lib/src/main/cpp/threadInfo.cpp Resolved
@r1viollet r1viollet changed the title Remove a looping allocation when updating threads [PROF-10688] Remove a looping allocation when updating threads Oct 9, 2024
@jbachorik
jbachorik merged commit d741607 into main Oct 11, 2024
@jbachorik
jbachorik deleted the r1viollet/fix_looping_allocation branch October 11, 2024 08:40
@github-actions github-actions Bot added this to the 1.16.0 milestone Oct 11, 2024
@jbachorik jbachorik mentioned this pull request Nov 1, 2024
4 of 5 tasks
@zhengyu123 zhengyu123 added the fixed_version: v_1.16.0 Version this PR's fix shipped in label Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fixed_version: v_1.16.0 Version this PR's fix shipped in

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants