< prev index next >

src/hotspot/share/code/compiledMethod.hpp

   enum { cache_size = 16 };
   Klass*   _exception_type;
   address  _pc[cache_size];
   address  _handler[cache_size];
   volatile int _count;
-  ExceptionCache* _next;
+  ExceptionCache* volatile _next;
+  ExceptionCache* _purge_list_next;
 
   inline address pc_at(int index);
   void set_pc_at(int index, address a)      { assert(index >= 0 && index < cache_size,""); _pc[index] = a; }
 
   inline address handler_at(int index);

@@ -63,12 +64,14 public: ExceptionCache(Handle exception, address pc, address handler); Klass* exception_type() { return _exception_type; } - ExceptionCache* next() { return _next; } - void set_next(ExceptionCache *ec) { _next = ec; } + ExceptionCache* next(); + void set_next(ExceptionCache *ec); + ExceptionCache* purge_list_next() { return _purge_list_next; } + void set_purge_list_next(ExceptionCache *ec) { _purge_list_next = ec; } address match(Handle exception, address pc); bool match_exception_with_space(Handle exception) ; address test_address(address addr); bool add_address_and_handler(address addr, address handler) ;
@@ -288,15 +291,18 virtual oop* oop_addr_at(int index) const = 0; virtual Metadata** metadata_addr_at(int index) const = 0; virtual void set_original_pc(const frame* fr, address pc) = 0; +protected: // Exception cache support - // Note: _exception_cache may be read concurrently. We rely on memory_order_consume here. + // Note: _exception_cache may be read and cleaned concurrently. ExceptionCache* exception_cache() const { return _exception_cache; } + ExceptionCache* exception_cache_acquire() const; void set_exception_cache(ExceptionCache *ec) { _exception_cache = ec; } - void release_set_exception_cache(ExceptionCache *ec); + +public: address handler_for_exception_and_pc(Handle exception, address pc); void add_handler_for_exception_and_pc(Handle exception, address pc, address handler); void clean_exception_cache(); void add_exception_cache_entry(ExceptionCache* new_entry);
< prev index next >