mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-25 13:54:38 +02:00
7115199: Add event tracing hooks and Java Flight Recorder infrastructure
Added a nop tracing infrastructure, JFR makefile changes and other infrastructure used only by JFR. Reviewed-by: acorn, sspitsyn
This commit is contained in:
parent
849571d5b3
commit
007126d010
29 changed files with 352 additions and 11 deletions
|
@ -204,6 +204,24 @@ Symbol* SymbolTable::lookup_only(const char* name, int len,
|
|||
return s;
|
||||
}
|
||||
|
||||
// Look up the address of the literal in the SymbolTable for this Symbol*
|
||||
// Do not create any new symbols
|
||||
// Do not increment the reference count to keep this alive
|
||||
Symbol** SymbolTable::lookup_symbol_addr(Symbol* sym){
|
||||
unsigned int hash = hash_symbol((char*)sym->bytes(), sym->utf8_length());
|
||||
int index = the_table()->hash_to_index(hash);
|
||||
|
||||
for (HashtableEntry<Symbol*>* e = the_table()->bucket(index); e != NULL; e = e->next()) {
|
||||
if (e->hash() == hash) {
|
||||
Symbol* literal_sym = e->literal();
|
||||
if (sym == literal_sym) {
|
||||
return e->literal_addr();
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Suggestion: Push unicode-based lookup all the way into the hashing
|
||||
// and probing logic, so there is no need for convert_to_utf8 until
|
||||
// an actual new Symbol* is created.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue