src/hotspot/share/interpreter/oopMapCache.cpp
changeset 58083 9046db64ca39
parent 47634 6a0c42c40cd1
child 59247 56bf71d64d51
equal deleted inserted replaced
58081:8b08eaf9a0eb 58083:9046db64ca39
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   592   }
   592   }
   593 }
   593 }
   594 
   594 
   595 void OopMapCache::compute_one_oop_map(const methodHandle& method, int bci, InterpreterOopMap* entry) {
   595 void OopMapCache::compute_one_oop_map(const methodHandle& method, int bci, InterpreterOopMap* entry) {
   596   // Due to the invariants above it's tricky to allocate a temporary OopMapCacheEntry on the stack
   596   // Due to the invariants above it's tricky to allocate a temporary OopMapCacheEntry on the stack
   597   OopMapCacheEntry* tmp = NEW_C_HEAP_ARRAY(OopMapCacheEntry, 1, mtClass);
   597   OopMapCacheEntry* tmp = NEW_C_HEAP_OBJ(OopMapCacheEntry, mtClass);
   598   tmp->initialize();
   598   tmp->initialize();
   599   tmp->fill(method, bci);
   599   tmp->fill(method, bci);
   600   entry->resource_copy(tmp);
   600   entry->resource_copy(tmp);
   601   FREE_C_HEAP_ARRAY(OopMapCacheEntry, tmp);
   601   FREE_C_HEAP_OBJ(tmp);
   602 }
   602 }