Closed Bug 1926225 Opened 10 months ago Closed 10 months ago

Avoid malloc/free for function's name in GeckoProfilerRuntime::allocProfileString

Categories

(Core :: JavaScript Engine, task, P2)

task

Tracking

()

RESOLVED FIXED
133 Branch
Tracking Status
firefox133 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [sp3])

Attachments

(1 file)

Minor but I noticed this in a profile recently. Instead of using StringToNewUTF8CharsZ we should use DeflateStringToUTF8Buffer to write directly to the target buffer to avoid the extra malloc/free and string copy.

Write to the result string directly to avoid the extra allocation and strlen/memcpy.

Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e0db86fb83c4 Avoid malloc/free for UTF8 function name in GeckoProfilerRuntime::allocProfileString. r=jonco
Blocks: sm-js-perf
Severity: -- → N/A
Priority: -- → P2
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
Whiteboard: [sp3]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: