Mercurial > hg > graal-compiler
comparison src/share/vm/oops/methodDataOop.hpp @ 1257:7b4415a18c8a
Merge
author | kvn |
---|---|
date | Fri, 12 Feb 2010 15:27:36 -0800 |
parents | 576e77447e3c |
children | c18cbe5936b8 |
comparison
equal
deleted
inserted
replaced
1249:95d21201c29a | 1257:7b4415a18c8a |
---|---|
1 /* | 1 /* |
2 * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. | 2 * Copyright 2000-2010 Sun Microsystems, Inc. All Rights Reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
543 } | 543 } |
544 static ByteSize counter_data_size() { | 544 static ByteSize counter_data_size() { |
545 return cell_offset(counter_cell_count); | 545 return cell_offset(counter_cell_count); |
546 } | 546 } |
547 | 547 |
548 void set_count(uint count) { | |
549 set_uint_at(count_off, count); | |
550 } | |
551 | |
548 #ifndef PRODUCT | 552 #ifndef PRODUCT |
549 void print_data_on(outputStream* st); | 553 void print_data_on(outputStream* st); |
550 #endif | 554 #endif |
551 }; | 555 }; |
552 | 556 |
690 set_uint_at(receiver_count_cell_index(row), count); | 694 set_uint_at(receiver_count_cell_index(row), count); |
691 } | 695 } |
692 | 696 |
693 void clear_row(uint row) { | 697 void clear_row(uint row) { |
694 assert(row < row_limit(), "oob"); | 698 assert(row < row_limit(), "oob"); |
699 // Clear total count - indicator of polymorphic call site. | |
700 // The site may look like as monomorphic after that but | |
701 // it allow to have more accurate profiling information because | |
702 // there was execution phase change since klasses were unloaded. | |
703 // If the site is still polymorphic then MDO will be updated | |
704 // to reflect it. But it could be the case that the site becomes | |
705 // only bimorphic. Then keeping total count not 0 will be wrong. | |
706 // Even if we use monomorphic (when it is not) for compilation | |
707 // we will only have trap, deoptimization and recompile again | |
708 // with updated MDO after executing method in Interpreter. | |
709 // An additional receiver will be recorded in the cleaned row | |
710 // during next call execution. | |
711 // | |
712 // Note: our profiling logic works with empty rows in any slot. | |
713 // We do sorting a profiling info (ciCallProfile) for compilation. | |
714 // | |
715 set_count(0); | |
695 set_receiver(row, NULL); | 716 set_receiver(row, NULL); |
696 set_receiver_count(row, 0); | 717 set_receiver_count(row, 0); |
697 } | 718 } |
698 | 719 |
699 // Code generation support | 720 // Code generation support |