1.1 --- a/src/share/vm/code/codeCache.hpp Thu Sep 05 18:40:52 2019 +0800 1.2 +++ b/src/share/vm/code/codeCache.hpp Thu Sep 05 18:52:27 2019 +0800 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -65,6 +65,10 @@ 1.11 1.12 static int _codemem_full_count; 1.13 1.14 + static void set_scavenge_root_nmethods(nmethod* nm) { _scavenge_root_nmethods = nm; } 1.15 + static void prune_scavenge_root_nmethods(); 1.16 + static void unlink_scavenge_root_nmethod(nmethod* nm, nmethod* prev); 1.17 + 1.18 public: 1.19 1.20 // Initialization 1.21 @@ -135,13 +139,17 @@ 1.22 // to "true" iff some code got unloaded. 1.23 static void do_unloading(BoolObjectClosure* is_alive, bool unloading_occurred); 1.24 static void asserted_non_scavengable_nmethods_do(CodeBlobClosure* f = NULL) PRODUCT_RETURN; 1.25 - static void scavenge_root_nmethods_do(CodeBlobClosure* f); 1.26 + 1.27 + // Apply f to every live code blob in scavengable nmethods. Prune nmethods 1.28 + // from the list of scavengable nmethods if f->fix_relocations() and a nmethod 1.29 + // no longer has scavengable oops. If f->fix_relocations(), then f must copy 1.30 + // objects to their new location immediately to avoid fixing nmethods on the 1.31 + // basis of the old object locations. 1.32 + static void scavenge_root_nmethods_do(CodeBlobToOopClosure* f); 1.33 1.34 static nmethod* scavenge_root_nmethods() { return _scavenge_root_nmethods; } 1.35 - static void set_scavenge_root_nmethods(nmethod* nm) { _scavenge_root_nmethods = nm; } 1.36 static void add_scavenge_root_nmethod(nmethod* nm); 1.37 static void drop_scavenge_root_nmethod(nmethod* nm); 1.38 - static void prune_scavenge_root_nmethods(); 1.39 1.40 // Printing/debugging 1.41 static void print(); // prints summary