diff options
| author | 2024-02-20 15:30:24 +0000 | |
|---|---|---|
| committer | 2024-04-09 08:03:19 +0000 | |
| commit | 69560c684433f364032dcce817414ef37aea11e8 (patch) | |
| tree | 435d6c82b624a934182628bd1e35ca90178fc312 /compiler/optimizing/loop_analysis.h | |
| parent | 116231387eec9d71e9bf292886f6b51a5f78b867 (diff) | |
Avoid looking up for method id on each trace entry
We used to look up for method id in the method pointer to method id map
to both record method info if this is the first time we are seeing the
method and also to obtain a 32-method id to avoid using 64-bits for
encoding method id. Looking up for the method id on each trace entry is
expensive.
With the new method format we could use 64-bits
since we encode the full 64-bit only once at the start of the block of
trace entries. The subsequent methods are encoded as a diff so using
64-bits doesn't increase the trace file size by a lot. We also record
the methods on class load so we don't need the map to check if we need
to record the method information.
This increases the trace file size but improves the performance. On a
30 seconds trace on google maps, it increases the file size by about 35%
but decreases the time spent on processing trace entries from 3.5 seconds
to 1.2 seconds on main thread and from 12 seconds to 3 seconds on trace
processor thread.
Bug: 259258187
Test: art/test.py
Change-Id: I4f20336624d94793a8f6109086aff55d09dcc54e
Diffstat (limited to 'compiler/optimizing/loop_analysis.h')
0 files changed, 0 insertions, 0 deletions