summaryrefslogtreecommitdiff
path: root/compiler/optimizing/graph_visualizer.cc
diff options
context:
space:
mode:
authorRoland Levillain <rpl@google.com>2018-08-06 15:05:20 +0100
committerRoland Levillain <rpl@google.com>2018-08-06 15:38:35 +0100
commit1b6e6fd7e47080087967b1e528f84477a4dca43d (patch)
treee178e6a013764ad5d19e89d56919949a7bdffe5c /compiler/optimizing/graph_visualizer.cc
parentf5705e3502183e6dfd03facada5f5cbfab116ec7 (diff)
Fix cyclic region allocation for large regions in ART's RegionSpace.
When using the cyclic region allocation strategy, art::gc::space::RegionSpace::AllocLarge (large region allocation) calls art::gc::space::RegionSpace::AllocLargeInRange once (if it succeeds in allocating in the area located past the current cyclic alloc region index) or twice (if the first call failed and it tries to allocate from the beginning of the region space). The upper bound (`cyclic_alloc_region_index_ + num_regions_ - 1`) of the range passed to that second call to art::gc::space::RegionSpace::AllocLargeInRange was incorrect for two reasons: 1. `num_regions_` (the total number of regions in the regions space) was used instead of `num_regs` (the number of regions in the large region begin alocated); 2. we did not ensure that this upper bound did not go beyond `num_regions_`. This change addresses these two issues and renames `num_regs` as `num_regs_in_large_region` to remove the ambiguity in the first reason. This change also fixes the names of arguments in art::gc::space::RegionSpace::AllocLargeInRange's declaration. Test: art/test/testrunner/testrunner.py --gcstress Bug: 112246149 Bug: 111766751 Bug: 74064045 Change-Id: I3fb29c8db7a3d00a98ef318e840a17b3443bb940
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
0 files changed, 0 insertions, 0 deletions