diff options
author | coleenp <none@none> | 2014-03-03 13:58:52 -0500 |
---|---|---|
committer | coleenp <none@none> | 2014-03-03 13:58:52 -0500 |
commit | 0af9f14e3695ece780cb9698f33523a1db49ce86 (patch) | |
tree | 3223220f1753db8544fb889d63c70835a393c724 /src/share/vm | |
parent | ce35e25eae19cfe2538146a6477953c738cffc40 (diff) |
8035735: Metaspace::contains become extremely slow in some cases
Summary: Call is_metadata instead which does less work for the call in debugInfo.hpp which is called for all compiled code stack frames.
Reviewed-by: jmasa, dcubed
Diffstat (limited to 'src/share/vm')
-rw-r--r-- | src/share/vm/code/debugInfo.hpp | 6 | ||||
-rw-r--r-- | src/share/vm/oops/metadata.hpp | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/share/vm/code/debugInfo.hpp b/src/share/vm/code/debugInfo.hpp index cf0a9a6d3..287ff876c 100644 --- a/src/share/vm/code/debugInfo.hpp +++ b/src/share/vm/code/debugInfo.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -273,8 +273,8 @@ class DebugInfoReadStream : public CompressedReadStream { } Method* read_method() { Method* o = (Method*)(code()->metadata_at(read_int())); - assert(o == NULL || - o->is_metaspace_object(), "meta data only"); + // is_metadata() is a faster check than is_metaspace_object() + assert(o == NULL || o->is_metadata(), "meta data only"); return o; } ScopeValue* read_object_value(); diff --git a/src/share/vm/oops/metadata.hpp b/src/share/vm/oops/metadata.hpp index 84a60893e..dc52c452e 100644 --- a/src/share/vm/oops/metadata.hpp +++ b/src/share/vm/oops/metadata.hpp @@ -42,6 +42,7 @@ class Metadata : public MetaspaceObj { // Rehashing support for tables containing pointers to this unsigned int new_hash(juint seed) { ShouldNotReachHere(); return 0; } + virtual bool is_metadata() const volatile { return true; } virtual bool is_klass() const volatile { return false; } virtual bool is_method() const volatile { return false; } virtual bool is_methodData() const volatile { return false; } |