summaryrefslogtreecommitdiff
path: root/compiler/compiler.h
diff options
context:
space:
mode:
author Mythri Alle <mythria@google.com> 2025-01-30 15:09:31 +0000
committer Mythri Alle <mythria@google.com> 2025-02-11 03:12:14 -0800
commit6d198c0cc746bd8e9a260e9fca39dda59047124c (patch)
treece0136a378714eb1522991d32fdfce7fa68d01b2 /compiler/compiler.h
parent2687609506c22cdc2353433be7595bafc0a288b6 (diff)
Handle overflow when writing events to the file in V2 trace format
We assumed the buffer was large enough to hold all encoded events when processing trace events. For V1 this was possible because the event entry is fixed size and it is possible to allocate large enough buffers. For format V2, we use variable length encoding and hence the actual size required would be much smaller than the worst case estimate. It is not good to further increase the size of buffers, so update the implementation to handle overflows. It just finished the events block when the buffer is almost full and starts a new one. We don't expect this to happen often, so this shouldn't have any noticeable performance / file size impact. Bug: 259258187 Test: art/test.py -t 2246-trace-v2 Change-Id: Id6b128dd3b9de33301c7313f5baf8cf9631077ef
Diffstat (limited to 'compiler/compiler.h')
0 files changed, 0 insertions, 0 deletions