Mercurial > hg > graal-jvmci-8
comparison 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 |
comparison
equal
deleted
inserted
replaced
14260:8cdf3f43f63e | 14262:3aaa4b9966f6 |
---|---|
478 } | 478 } |
479 | 479 |
480 bool next(); | 480 bool next(); |
481 | 481 |
482 DepType type() { return _type; } | 482 DepType type() { return _type; } |
483 bool has_oop_argument() { return type() == call_site_target_value; } | |
484 uintptr_t get_identifier(int i); | |
485 | |
483 int argument_count() { return dep_args(type()); } | 486 int argument_count() { return dep_args(type()); } |
484 int argument_index(int i) { assert(0 <= i && i < argument_count(), "oob"); | 487 int argument_index(int i) { assert(0 <= i && i < argument_count(), "oob"); |
485 return _xi[i]; } | 488 return _xi[i]; } |
486 Metadata* argument(int i); // => recorded_oop_at(argument_index(i)) | 489 Metadata* argument(int i); // => recorded_oop_at(argument_index(i)) |
487 oop argument_oop(int i); // => recorded_oop_at(argument_index(i)) | 490 oop argument_oop(int i); // => recorded_oop_at(argument_index(i)) |
520 friend class Dependencies::DepStream; | 523 friend class Dependencies::DepStream; |
521 | 524 |
522 static void print_statistics() PRODUCT_RETURN; | 525 static void print_statistics() PRODUCT_RETURN; |
523 }; | 526 }; |
524 | 527 |
528 | |
529 class DependencySignature : public ResourceObj { | |
530 private: | |
531 int _args_count; | |
532 uintptr_t _argument_hash[Dependencies::max_arg_count]; | |
533 Dependencies::DepType _type; | |
534 | |
535 | |
536 public: | |
537 DependencySignature(Dependencies::DepStream& dep) { | |
538 _args_count = dep.argument_count(); | |
539 _type = dep.type(); | |
540 for (int i = 0; i < _args_count; i++) { | |
541 _argument_hash[i] = dep.get_identifier(i); | |
542 } | |
543 } | |
544 | |
545 bool equals(const DependencySignature& sig) const; | |
546 | |
547 int args_count() const { return _args_count; } | |
548 uintptr_t arg(int idx) const { return _argument_hash[idx]; } | |
549 Dependencies::DepType type() const { return _type; } | |
550 }; | |
551 | |
552 class DependencySignatureBuffer : public StackObj { | |
553 private: | |
554 GrowableArray<DependencySignature*>** _signatures; | |
555 | |
556 public: | |
557 DependencySignatureBuffer(); | |
558 bool add_if_missing(const DependencySignature& sig); | |
559 }; | |
525 | 560 |
526 // Every particular DepChange is a sub-class of this class. | 561 // Every particular DepChange is a sub-class of this class. |
527 class DepChange : public StackObj { | 562 class DepChange : public StackObj { |
528 public: | 563 public: |
529 // What kind of DepChange is this? | 564 // What kind of DepChange is this? |