Commit 5b3cc779 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Turn down verbosity

parent 9ee0bd8d
......@@ -61,7 +61,7 @@ ICSlotRewrite::ICSlotRewrite(ICInfo* ic, const char* debug_name) : ic(ic), debug
assembler = new Assembler(buf, ic->getSlotSize());
assembler->nop();
if (VERBOSITY() >= 2)
if (VERBOSITY() >= 4)
printf("starting %s icentry\n", debug_name);
}
......@@ -86,7 +86,7 @@ void ICSlotRewrite::commit(CommitHook* hook) {
}
}
if (!still_valid) {
if (VERBOSITY() >= 2)
if (VERBOSITY() >= 3)
printf("not committing %s icentry since a dependency got updated before commit\n", debug_name);
return;
}
......@@ -165,14 +165,14 @@ ICSlotInfo* ICInfo::pickEntryForRewrite(const char* debug_name) {
if (sinfo.num_inside)
continue;
if (VERBOSITY() >= 3) {
if (VERBOSITY() >= 4) {
printf("committing %s icentry to in-use slot %d at %p\n", debug_name, i, start_addr);
}
next_slot_to_try = i + 1;
return &sinfo;
}
if (VERBOSITY() >= 3)
if (VERBOSITY() >= 4)
printf("not committing %s icentry since there are no available slots\n", debug_name);
return NULL;
}
......@@ -259,7 +259,7 @@ void ICInfo::clear(ICSlotInfo* icentry) {
uint8_t* start = (uint8_t*)start_addr + icentry->idx * getSlotSize();
if (VERBOSITY() >= 3)
if (VERBOSITY() >= 4)
printf("clearing patchpoint %p, slot at %p\n", start_addr, start);
std::unique_ptr<Assembler> writer(new Assembler(start, getSlotSize()));
......
......@@ -185,12 +185,12 @@ static void optimizeIR(llvm::Function* f, EffortLevel effort) {
bool changed = fpm.run(*f);
if (!changed) {
if (VERBOSITY("irgen"))
if (VERBOSITY("irgen") >= 2)
printf("done after %d optimization iterations\n", i - 1);
break;
}
if (VERBOSITY("irgen") >= 1) {
if (VERBOSITY("irgen") >= 2) {
fprintf(stderr, "after optimization %d:\n", i);
printf("\033[36m");
fflush(stdout);
......@@ -266,7 +266,7 @@ static std::vector<std::pair<CFGBlock*, CFGBlock*>> computeBlockTraversalOrder(c
}
assert(best != NULL);
if (VERBOSITY("irgen") >= 1)
if (VERBOSITY("irgen") >= 2)
printf("Giving up and adding block %d to the order\n", best->idx);
in_queue.insert(best);
rtn.push_back(std::make_pair(best, (CFGBlock*)NULL));
......@@ -457,7 +457,7 @@ static void emitBBs(IRGenState* irstate, TypeAnalysis* types, const OSREntryDesc
phi_type->debugName().c_str());
}
if (VERBOSITY("irgen"))
if (VERBOSITY("irgen") >= 2)
v->setName("prev_" + p.first.str());
(*osr_syms)[p.first] = new ConcreteCompilerVariable(phi_type, v, true);
......@@ -507,11 +507,11 @@ static void emitBBs(IRGenState* irstate, TypeAnalysis* types, const OSREntryDesc
CFGBlock* block = traversal_order[_i].first;
CFGBlock* pred = traversal_order[_i].second;
if (VERBOSITY("irgen") >= 2)
if (VERBOSITY("irgen") >= 3)
printf("processing block %d\n", block->idx);
if (!blocks.count(block)) {
if (VERBOSITY("irgen") >= 2)
if (VERBOSITY("irgen") >= 3)
printf("Skipping this block\n");
// created_phis[block] = NULL;
// ending_symbol_tables[block] = NULL;
......@@ -872,7 +872,7 @@ static void emitBBs(IRGenState* irstate, TypeAnalysis* types, const OSREntryDesc
}
static void computeBlockSetClosure(BlockSet& blocks) {
if (VERBOSITY("irgen") >= 1) {
if (VERBOSITY("irgen") >= 2) {
printf("Initial:");
for (CFGBlock* b : blocks) {
printf(" %d", b->idx);
......@@ -898,7 +898,7 @@ static void computeBlockSetClosure(BlockSet& blocks) {
}
}
if (VERBOSITY("irgen") >= 1) {
if (VERBOSITY("irgen") >= 2) {
printf("Ending:");
for (CFGBlock* b : blocks) {
printf(" %d", b->idx);
......
......@@ -170,7 +170,7 @@ static void compileIR(CompiledFunction* cf, EffortLevel effort) {
}
}
if (VERBOSITY("irgen") >= 1) {
if (VERBOSITY("irgen") >= 2) {
printf("Compiled function to %p\n", cf->code);
}
......@@ -200,7 +200,7 @@ CompiledFunction* compileFunction(CLFunction* f, FunctionSpecialization* spec, E
llvm::raw_string_ostream ss(s);
if (spec) {
ss << "\033[34;1mJIT'ing " << name << " with signature (";
ss << "\033[34;1mJIT'ing " << source->parent_module->fn << ":" << name << " with signature (";
for (int i = 0; i < spec->arg_types.size(); i++) {
if (i > 0)
ss << ", ";
......@@ -210,7 +210,7 @@ CompiledFunction* compileFunction(CLFunction* f, FunctionSpecialization* spec, E
ss << ") -> ";
ss << spec->rtn_type->debugName();
} else {
ss << "\033[34;1mDoing OSR-entry partial compile of " << name << ", starting with backedge to block "
ss << "\033[34;1mDoing OSR-entry partial compile of " << source->parent_module->fn << ":" << name << ", starting with backedge to block "
<< entry_descriptor->backedge->target->idx;
}
ss << " at effort level " << (int)effort;
......@@ -580,7 +580,7 @@ void* compilePartialFunc(OSRExit* exit) {
static StatCounter stat_reopt("reopts");
extern "C" CompiledFunction* reoptCompiledFuncInternal(CompiledFunction* cf) {
if (VERBOSITY("irgen") >= 1)
if (VERBOSITY("irgen") >= 2)
printf("In reoptCompiledFunc, %p, %ld\n", cf, cf->times_called);
stat_reopt.log();
......
......@@ -67,7 +67,7 @@ public:
AliasResult _alias(const Location& LocA, const Location& LocB) {
AliasResult base = AliasAnalysis::alias(LocA, LocB);
if (VERBOSITY("opt.aa") >= 2) {
if (VERBOSITY("opt.aa") >= 4) {
indent();
errs() << "_alias():\n";
// cast<Instruction>(LocA.Ptr)->getParent()->dump();
......@@ -97,12 +97,12 @@ public:
continue;
const Value* bc_base = *BI->op_begin();
if (VERBOSITY("opt.aa") >= 2) {
if (VERBOSITY("opt.aa") >= 4) {
indent();
errs() << "loc " << i << " is bitcast, recursing\n";
}
AliasResult bc_base_aliases = alias(locs[i ^ 1], Location(bc_base, locs[i].Size));
if (VERBOSITY("opt.aa") >= 2) {
if (VERBOSITY("opt.aa") >= 4) {
indent();
bc_base->dump();
indent();
......@@ -122,12 +122,12 @@ public:
assert(baseA);
assert(baseB);
if (VERBOSITY("opt.aa") >= 2) {
if (VERBOSITY("opt.aa") >= 4) {
indent();
errs() << "2 geps, recursing\n";
}
AliasResult bases_alias = alias(Location(baseA), Location(baseB));
if (VERBOSITY("opt.aa") >= 2) {
if (VERBOSITY("opt.aa") >= 4) {
indent();
errs() << "2gep base aliases: " << bases_alias << '\n';
indent();
......@@ -146,7 +146,7 @@ public:
bool accumA = GIa->accumulateConstantOffset(*DL, offsetA);
bool accumB = GIb->accumulateConstantOffset(*DL, offsetB);
if (accumA && accumB) {
if (VERBOSITY("opt.aa") >= 2) {
if (VERBOSITY("opt.aa") >= 4) {
indent();
errs() << offsetA << ' ' << LocA.Size << ' ' << offsetB << ' ' << LocB.Size << '\n';
}
......@@ -184,12 +184,12 @@ public:
const Value* gep_base = GI->getPointerOperand();
assert(gep_base);
if (VERBOSITY("opt.aa") >= 2) {
if (VERBOSITY("opt.aa") >= 4) {
indent();
errs() << "loc " << i << " is gep, recursing\n";
}
AliasResult gep_base_aliases = alias(locs[i ^ 1], Location(gep_base));
if (VERBOSITY("opt.aa") >= 2) {
if (VERBOSITY("opt.aa") >= 4) {
indent();
gep_base->dump();
indent();
......@@ -222,13 +222,13 @@ public:
}
AliasResult alias(const Location& LocA, const Location& LocB) override {
if (VERBOSITY("opt.aa") >= 2 && depth == 0 && isa<Instruction>(LocA.Ptr)) {
if (VERBOSITY("opt.aa") >= 4 && depth == 0 && isa<Instruction>(LocA.Ptr)) {
cast<Instruction>(LocA.Ptr)->getParent()->dump();
}
depth++;
AliasResult rtn = _alias(LocA, LocB);
if (VERBOSITY("opt.aa") >= 2) {
if (VERBOSITY("opt.aa") >= 4) {
indent();
errs() << "alias():\n";
indent();
......@@ -250,7 +250,7 @@ public:
if (!CS.getCalledFunction())
return base;
if (VERBOSITY("opt.aa") >= 2) {
if (VERBOSITY("opt.aa") >= 4) {
errs() << "getModRefInfo():\n";
CS->dump();
Loc.Ptr->dump();
......@@ -269,7 +269,7 @@ public:
if (escapes != EscapeAnalysis::Escaped) {
StatCounter num_improved("opt_modref_noescape");
num_improved.log();
if (VERBOSITY("opt.aa") >= 2) {
if (VERBOSITY("opt.aa") >= 4) {
errs() << "Was able to show that " << *CS.getInstruction() << " can't modify " << *Loc.Ptr << '\n';
}
return NoModRef;
......
......@@ -71,7 +71,7 @@ void StackmapJITEventListener::NotifyObjectEmitted(const llvm::object::ObjectFil
uint64_t stackmap_address = L.getSectionLoadAddress(name);
assert(stackmap_address > 0);
if (VERBOSITY() >= 2)
if (VERBOSITY() >= 3)
printf("Found the stackmaps at stackmap_address 0x%lx\n", stackmap_address);
assert(cur_map == NULL);
......@@ -102,27 +102,27 @@ void StackmapJITEventListener::NotifyObjectEmitted(const llvm::object::ObjectFil
int nconstants = *ptr.u32++;
int nrecords = *ptr.u32++;
if (VERBOSITY() >= 2)
if (VERBOSITY() >= 3)
printf("%d functions\n", nfunctions);
for (int i = 0; i < nfunctions; i++) {
const StackMap::StackSizeRecord& size_record = *ptr.size_record++;
cur_map->stack_size_records.push_back(size_record);
if (VERBOSITY() >= 2)
if (VERBOSITY() >= 3)
printf("function %d: offset 0x%lx, stack size 0x%lx\n", i, size_record.offset,
size_record.stack_size);
}
if (VERBOSITY() >= 2)
if (VERBOSITY() >= 3)
printf("%d constants\n", nconstants);
for (int i = 0; i < nconstants; i++) {
uint64_t constant = *ptr.u64++;
if (VERBOSITY() >= 2)
if (VERBOSITY() >= 3)
printf("Constant %d: %ld\n", i, constant);
cur_map->constants.push_back(constant);
}
if (VERBOSITY() >= 2)
if (VERBOSITY() >= 3)
printf("%d records\n", nrecords);
for (int i = 0; i < nrecords; i++) {
......@@ -135,7 +135,7 @@ void StackmapJITEventListener::NotifyObjectEmitted(const llvm::object::ObjectFil
int numlocations = *ptr.u16++;
if (VERBOSITY() >= 2)
if (VERBOSITY() >= 3)
printf("Stackmap record %ld at 0x%x has %d locations:\n", record->id, record->offset, numlocations);
for (int j = 0; j < numlocations; j++) {
assert(sizeof(StackMap::Record::Location) == sizeof(*ptr.u64));
......@@ -148,7 +148,7 @@ void StackmapJITEventListener::NotifyObjectEmitted(const llvm::object::ObjectFil
"%rax", "%rdx", "%rcx", "%rbx", "%rsi", "%rdi", "%rbp", "%rsp",
"%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15",
};
if (VERBOSITY() >= 2) {
if (VERBOSITY() >= 3) {
if (r.type == 1) {
printf("Location %d: type %d (reg), reg %d (%s), offset %d\n", j, r.type, r.regnum,
dwarf_reg_names[r.regnum], r.offset);
......@@ -164,7 +164,7 @@ void StackmapJITEventListener::NotifyObjectEmitted(const llvm::object::ObjectFil
const StackMap::Record::LiveOut& r = *ptr.record_liveout++;
record->live_outs.push_back(r);
if (VERBOSITY() >= 2) {
if (VERBOSITY() >= 3) {
printf("Live out %d: reg #%d (?), size %d\n", i, r.regnum, r.size);
}
}
......
......@@ -182,7 +182,7 @@ public:
Addr, Size, llvm::DILineInfoSpecifier(llvm::DILineInfoSpecifier::FileLineInfoKind::AbsoluteFilePath,
llvm::DILineInfoSpecifier::FunctionNameKind::LinkageName));
#endif
if (VERBOSITY() >= 2) {
if (VERBOSITY() >= 3) {
for (int i = 0; i < lines.size(); i++) {
printf("%s:%d, %s: %lx\n", lines[i].second.FileName.c_str(), lines[i].second.Line,
lines[i].second.FunctionName.c_str(), lines[i].first);
......@@ -213,7 +213,7 @@ public:
eh_frame_addr = L.getSectionLoadAddress(name);
eh_frame_size = sec.getSize();
if (VERBOSITY())
if (VERBOSITY() >= 2)
printf("eh_frame: %lx %lx\n", eh_frame_addr, eh_frame_size);
found_eh_frame = true;
} else if (name == ".text") {
......@@ -221,7 +221,7 @@ public:
text_addr = L.getSectionLoadAddress(name);
text_size = sec.getSize();
if (VERBOSITY())
if (VERBOSITY() >= 2)
printf("text: %lx %lx\n", text_addr, text_size);
found_text = true;
}
......@@ -239,7 +239,7 @@ public:
dyn_info->u.rti.segbase = eh_frame_addr;
parseEhFrame(eh_frame_addr, eh_frame_size, &dyn_info->u.rti.table_data, &dyn_info->u.rti.table_len);
if (VERBOSITY())
if (VERBOSITY() >= 2)
printf("dyn_info = %p, table_data = %p\n", dyn_info, (void*)dyn_info->u.rti.table_data);
_U_dyn_register(dyn_info);
......
......@@ -127,7 +127,7 @@ void registerGCManagedBytes(size_t bytes) {
Heap global_heap;
bool _doFree(GCAllocation* al, std::list<Box*, StlCompatAllocator<Box*>>* weakly_referenced) {
if (VERBOSITY() >= 2)
if (VERBOSITY() >= 4)
printf("Freeing %p\n", al->user_data);
#ifndef NVALGRIND
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment