comparison src/share/vm/code/codeCache.hpp @ 14704:b51e29501f30

Merged with jdk9/dev/hotspot changeset 9486a41de3b7
author twisti
date Tue, 18 Mar 2014 20:19:10 -0700
parents cefad50507d8 480b0109db65
children 92aa6797d639
comparison
equal deleted inserted replaced
14647:8f483e200405 14704:b51e29501f30
56 static int _number_of_nmethods; 56 static int _number_of_nmethods;
57 static int _number_of_nmethods_with_dependencies; 57 static int _number_of_nmethods_with_dependencies;
58 static bool _needs_cache_clean; 58 static bool _needs_cache_clean;
59 static nmethod* _scavenge_root_nmethods; // linked via nm->scavenge_root_link() 59 static nmethod* _scavenge_root_nmethods; // linked via nm->scavenge_root_link()
60 60
61 static void verify_if_often() PRODUCT_RETURN;
62
63 static void mark_scavenge_root_nmethods() PRODUCT_RETURN; 61 static void mark_scavenge_root_nmethods() PRODUCT_RETURN;
64 static void verify_perm_nmethods(CodeBlobClosure* f_or_null) PRODUCT_RETURN; 62 static void verify_perm_nmethods(CodeBlobClosure* f_or_null) PRODUCT_RETURN;
65 63
66 static int _codemem_full_count; 64 static int _codemem_full_count;
65 static size_t bytes_allocated_in_freelist() { return _heap->allocated_in_freelist(); }
66 static int allocated_segments() { return _heap->allocated_segments(); }
67 static size_t freelist_length() { return _heap->freelist_length(); }
67 68
68 public: 69 public:
69 70
70 // Initialization 71 // Initialization
71 static void initialize(); 72 static void initialize();
76 static CodeBlob* allocate(int size, bool is_critical = false); // allocates a new CodeBlob 77 static CodeBlob* allocate(int size, bool is_critical = false); // allocates a new CodeBlob
77 static void commit(CodeBlob* cb); // called when the allocated CodeBlob has been filled 78 static void commit(CodeBlob* cb); // called when the allocated CodeBlob has been filled
78 static int alignment_unit(); // guaranteed alignment of all CodeBlobs 79 static int alignment_unit(); // guaranteed alignment of all CodeBlobs
79 static int alignment_offset(); // guaranteed offset of first CodeBlob byte within alignment unit (i.e., allocation header) 80 static int alignment_offset(); // guaranteed offset of first CodeBlob byte within alignment unit (i.e., allocation header)
80 static void free(CodeBlob* cb); // frees a CodeBlob 81 static void free(CodeBlob* cb); // frees a CodeBlob
81 static void flush(); // flushes all CodeBlobs
82 static bool contains(void *p); // returns whether p is included 82 static bool contains(void *p); // returns whether p is included
83 static void blobs_do(void f(CodeBlob* cb)); // iterates over all CodeBlobs 83 static void blobs_do(void f(CodeBlob* cb)); // iterates over all CodeBlobs
84 static void blobs_do(CodeBlobClosure* f); // iterates over all CodeBlobs 84 static void blobs_do(CodeBlobClosure* f); // iterates over all CodeBlobs
85 static void nmethods_do(void f(nmethod* nm)); // iterates over all nmethods 85 static void nmethods_do(void f(nmethod* nm)); // iterates over all nmethods
86 static void alive_nmethods_do(void f(nmethod* nm)); // iterates over all alive nmethods 86 static void alive_nmethods_do(void f(nmethod* nm)); // iterates over all alive nmethods
148 static void prune_scavenge_root_nmethods(); 148 static void prune_scavenge_root_nmethods();
149 149
150 // Printing/debugging 150 // Printing/debugging
151 static void print(); // prints summary 151 static void print(); // prints summary
152 static void print_internals(); 152 static void print_internals();
153 static void print_memory_overhead();
153 static void verify(); // verifies the code cache 154 static void verify(); // verifies the code cache
154 static void print_trace(const char* event, CodeBlob* cb, int size = 0) PRODUCT_RETURN; 155 static void print_trace(const char* event, CodeBlob* cb, int size = 0) PRODUCT_RETURN;
155 static void print_summary(outputStream* st, bool detailed = true); // Prints a summary of the code cache usage 156 static void print_summary(outputStream* st, bool detailed = true); // Prints a summary of the code cache usage
156 static void log_state(outputStream* st); 157 static void log_state(outputStream* st);
157 158