void AOTCompiledMethod::log_state_change() const { if (LogCompilation) { ResourceMark m; if (xtty != NULL) { ttyLocker ttyl; // keep the following output all in one block if (*_state_adr == not_entrant) { xtty->begin_elem("make_not_entrant thread='" UINTX_FORMAT "'", os::current_thread_id()); } else if (*_state_adr == not_used) { xtty->begin_elem("make_not_used thread='" UINTX_FORMAT "'", os::current_thread_id()); } else if (*_state_adr == in_use) { xtty->begin_elem("make_entrant thread='" UINTX_FORMAT "'", os::current_thread_id()); } log_identity(xtty); xtty->stamp(); xtty->end_elem(); } } if (PrintCompilation) { ResourceMark m; if (*_state_adr == not_entrant) { print_on(tty, "made not entrant"); } else if (*_state_adr == not_used) { print_on(tty, "made not used"); } else if (*_state_adr == in_use) { print_on(tty, "made entrant"); } } }
void MethodLiveness::BasicBlock::propagate(MethodLiveness *ml) { // These set operations could be combined for efficiency if the // performance of this analysis becomes an issue. _entry.set_union(_normal_exit); _entry.set_difference(_kill); _entry.set_union(_gen); // Note that we merge information from our exceptional successors // just once, rather than at individual bytecodes. _entry.set_union(_exception_exit); if (TraceLivenessGen) { tty->print_cr(" ** Visiting block at %d **", start_bci()); print_on(tty); } int i; for (i=_normal_predecessors->length()-1; i>=0; i--) { BasicBlock *block = _normal_predecessors->at(i); if (block->merge_normal(_entry)) { ml->work_list_add(block); } } for (i=_exception_predecessors->length()-1; i>=0; i--) { BasicBlock *block = _exception_predecessors->at(i); if (block->merge_exception(_entry)) { ml->work_list_add(block); } } }
/* virtual */ void base::print_on(std::wostream& wos) const { TRACE_NEVER("hugh::support::ostream::printable::base::print_on(std::wostream)"); std::ostringstream ostr; print_on(ostr); wos << string_to_wstring(ostr.str()); }
bool HeapRegionSetBase::verify_region(HeapRegion* hr, HeapRegionSetBase* expected_containing_set) { const char* error_message = NULL; if (!regions_humongous()) { if (hr->isHumongous()) { error_message = "the region should not be humongous"; } } else { if (!hr->isHumongous() || !hr->startsHumongous()) { error_message = "the region should be 'starts humongous'"; } } if (!regions_empty()) { if (hr->is_empty()) { error_message = "the region should not be empty"; } } else { if (!hr->is_empty()) { error_message = "the region should be empty"; } } #ifdef ASSERT // The _containing_set field is only available when ASSERT is defined. if (hr->containing_set() != expected_containing_set) { error_message = "inconsistent containing set found"; } #endif // ASSERT const char* extra_error_message = verify_region_extra(hr); if (extra_error_message != NULL) { error_message = extra_error_message; } if (error_message != NULL) { outputStream* out = tty; out->cr(); out->print_cr("## [%s] %s", name(), error_message); out->print_cr("## Offending Region: "PTR_FORMAT, hr); out->print_cr(" "HR_FORMAT, HR_FORMAT_PARAMS(hr)); #ifdef ASSERT out->print_cr(" containing set: "PTR_FORMAT, hr->containing_set()); #endif // ASSERT out->print_cr("## Offending Region Set: "PTR_FORMAT, this); print_on(out); return false; } else { return true; } }
void SourceAssembler::Label::global(Stream* s) { char *cmd; if (GenerateGNUCode) { cmd = ".global"; } else { cmd = "EXPORT"; } GUARANTEE(_state == undefined, "bad label to make global"); s->print("\n\t%s\t", cmd); print_on(s); s->cr(); _state = exported; }
void SourceAssembler::Label::import(Stream* s) { char *cmd; if (GenerateGNUCode) { cmd = ".extern"; } else { cmd = "IMPORT"; } GUARANTEE(_state == undefined || _state == imported, "bad label to import"); if (_state == undefined) { s->print("\t%s\t", cmd); print_on(s); s->cr(); _state = imported; } }
void HeapRegion::set_zero_fill_state_work(ZeroFillState zfs) { assert(ZF_mon->owned_by_self() || Universe::heap()->is_gc_active(), "Must hold the lock or be a full GC to modify."); #ifdef ASSERT if (top() != bottom() && zfs != Allocated) { ResourceMark rm; stringStream region_str; print_on(®ion_str); assert(top() == bottom() || zfs == Allocated, err_msg("Region must be empty, or we must be setting it to allocated. " "_zfs=%d, zfs=%d, region: %s", _zfs, zfs, region_str.as_string())); } #endif _zfs = zfs; }
SourceAssembler::Label::~Label() { // Ideally, all symbolic labels should be defined centrally only once. // Then we could also check that a symbolic label has been imported or // exported. For now, don't do the check. // // (The problem right now is that interpreter_call_vm(_redo) really is a // 'local' label (not imported or exported) and thus we really should either // use an anonymous label or have a 3rd kind of symbolic labels that are // local; and than we need to differentiate between export and bind as well). GUARANTEE(_state != anonymous_used, "undefined anonymous label"); if (_state == anonymous_unused) { tty->print("Unused label: "); print_on(tty); tty->cr(); } }
void SourceAssembler::Label::bind(Stream* s, bool is_global) { switch(_state) { case undefined: global(s); break; case anonymous_unused: /* Fall through */ case anonymous_used: _state = anonymous_bound; break; case anonymous_bound: SHOULD_NOT_REACH_HERE(); break; default: break; } // start a new line if we are not at the beginning if (s->position() > 0) { s->cr(); } GUARANTEE(s->position() == 0, "wrong label position"); print_on(s); if (GenerateGNUCode) { s->print(":"); } else { if (is_global && !GenerateSDTCode) { s->print(" PROC"); } } s->cr(); }
void print() const { print_on(tty); }
void G1PageBasedVirtualSpace::print() { print_on(tty); }
void AdaptivePaddedNoZeroDevAverage::print() const { print_on(tty); }
void ConcurrentZFThread::print() const { print_on(tty); }
void AdaptiveWeightedAverage::print() const { print_on(tty); }
void AdaptivePaddedAverage::print() const { print_on(tty); }
void Field::p() { print_on(tty); }
char* oopDesc::print_string() { stringStream st; print_on(&st); return st.as_string(); }
void AllocatedObj::print() const { print_on(tty); }
void ParallelScavengeHeap::print() const { print_on(tty); }
void HeapRegion::print() const { print_on(gclog_or_tty); }
void ScopeDesc::print_on(outputStream* st) const { print_on(st, NULL); }
static void print() { print_on(tty); }
// printing on default output stream void print() { print_on(tty); }
void p() { print_on(tty); }
inline void print() { print_on(tty); }
void PSYoungGen::print() const { print_on(tty); }
void CodeBlob::print()const{ print_on(tty); }
void Generation::print() const { print_on(tty); }
void ConcurrentG1RefineThread::print() const { print_on(tty); }
void Space::print() const { print_on(tty); }