Mercurial > hg > graal-compiler
comparison src/share/vm/oops/methodData.hpp @ 8616:d343737786fe
changed profiling of exceptions so that the ExceptionSeen flag also works without GRAALVM
author | Christian Haeubl <haeubl@ssw.jku.at> |
---|---|
date | Thu, 28 Mar 2013 17:11:06 +0100 |
parents | 6c4db417385a |
children | 89e4d67fdd2a |
comparison
equal
deleted
inserted
replaced
8615:91c79e13b9cf | 8616:d343737786fe |
---|---|
459 class BitData : public ProfileData { | 459 class BitData : public ProfileData { |
460 protected: | 460 protected: |
461 enum { | 461 enum { |
462 // null_seen: | 462 // null_seen: |
463 // saw a null operand (cast/aastore/instanceof) | 463 // saw a null operand (cast/aastore/instanceof) |
464 null_seen_flag = DataLayout::first_flag + 0 | 464 null_seen_flag = DataLayout::first_flag + 0 |
465 #ifdef GRAAL | |
466 // bytecode threw any exception | |
467 , exception_seen_flag = null_seen_flag + 1 | |
468 #endif | |
465 }; | 469 }; |
466 enum { bit_cell_count = 0 }; // no additional data fields needed. | 470 enum { bit_cell_count = 0 }; // no additional data fields needed. |
467 public: | 471 public: |
468 BitData(DataLayout* layout) : ProfileData(layout) { | 472 BitData(DataLayout* layout) : ProfileData(layout) { |
469 } | 473 } |
482 | 486 |
483 // The null_seen flag bit is specially known to the interpreter. | 487 // The null_seen flag bit is specially known to the interpreter. |
484 // Consulting it allows the compiler to avoid setting up null_check traps. | 488 // Consulting it allows the compiler to avoid setting up null_check traps. |
485 bool null_seen() { return flag_at(null_seen_flag); } | 489 bool null_seen() { return flag_at(null_seen_flag); } |
486 void set_null_seen() { set_flag_at(null_seen_flag); } | 490 void set_null_seen() { set_flag_at(null_seen_flag); } |
487 | 491 #ifdef GRAAL |
492 // true if an exception was thrown at the specific BCI | |
493 bool exception_seen() { return flag_at(exception_seen_flag); } | |
494 void set_exception_seen() { set_flag_at(exception_seen_flag); } | |
495 #endif | |
488 | 496 |
489 // Code generation support | 497 // Code generation support |
490 static int null_seen_byte_constant() { | 498 static int null_seen_byte_constant() { |
491 return flag_number_to_byte_constant(null_seen_flag); | 499 return flag_number_to_byte_constant(null_seen_flag); |
492 } | 500 } |