Mercurial > hg > graal-jvmci-8
diff src/share/vm/code/dependencies.hpp @ 14262:3aaa4b9966f6
7194669: CodeCache::mark_for_deoptimization should avoid verifying dependencies multiple times
Summary: Avoid verifying dependencies multiple times by caching verified dependencies
Reviewed-by: kvn, twisti, roland
author | anoll |
---|---|
date | Wed, 15 Jan 2014 06:16:55 +0100 |
parents | da91efe96a93 |
children | 524b54a7f1b5 |
line wrap: on
line diff
--- a/src/share/vm/code/dependencies.hpp Tue Jan 14 14:51:47 2014 +0100 +++ b/src/share/vm/code/dependencies.hpp Wed Jan 15 06:16:55 2014 +0100 @@ -480,6 +480,9 @@ bool next(); DepType type() { return _type; } + bool has_oop_argument() { return type() == call_site_target_value; } + uintptr_t get_identifier(int i); + int argument_count() { return dep_args(type()); } int argument_index(int i) { assert(0 <= i && i < argument_count(), "oob"); return _xi[i]; } @@ -523,6 +526,38 @@ }; +class DependencySignature : public ResourceObj { + private: + int _args_count; + uintptr_t _argument_hash[Dependencies::max_arg_count]; + Dependencies::DepType _type; + + + public: + DependencySignature(Dependencies::DepStream& dep) { + _args_count = dep.argument_count(); + _type = dep.type(); + for (int i = 0; i < _args_count; i++) { + _argument_hash[i] = dep.get_identifier(i); + } + } + + bool equals(const DependencySignature& sig) const; + + int args_count() const { return _args_count; } + uintptr_t arg(int idx) const { return _argument_hash[idx]; } + Dependencies::DepType type() const { return _type; } +}; + +class DependencySignatureBuffer : public StackObj { + private: + GrowableArray<DependencySignature*>** _signatures; + + public: + DependencySignatureBuffer(); + bool add_if_missing(const DependencySignature& sig); +}; + // Every particular DepChange is a sub-class of this class. class DepChange : public StackObj { public: