void CGantnerTime::deviceEvent(QString xml) { QMap<QString, QVariant>params = CXmlFactory::deviceEvent(xml) ; QString event = params["event"].toString(); if(event == "bookingDetected") isAccess(params, true, true); if(event == "reloadAllData" ) reloadAllData(); }
bool nmethod::isTiny() { # ifdef SIC_COMPILER // is this a "tiny" nmethod, i.e. is it likely to be small when inlined? if (isAccess()) return true; if (compiler() == NIC) { // the NIC's code is large because it has many inline caches, so look // at the source fint len = ((methodMap*)method()->map())->codes()->length(); fint max = key.receiverMap()->is_block() ? TinyBlockSourceSize : TinyFnSourceSize; if (len <= max) return true; } else { fint len = instsLen() - oopSize * PrologueSize; if (len < TinyFnObjSize) return true; } // try this last because it's relatively expensive return isCheapMessage((stringOop)key.selector); # else return false; # endif }
bool nmethod::mustNotRecompile() { // answers true if nm must not be recompiled (for non-performance-related // reasons) // never recompile new-compiled uncommon branches // don't recompile zombies (if they're zombies because of uncommon branch // traps, the recompiled nmethod already exists) if (isZombie() || isInvalid()) return true; # ifdef SIC_COMPILER // the SIC doesn't compile access methods if (isAccess()) return true; if (version() >= MaxVersions && !isUncommonRecompiled()) return true; # endif // don't recompile VM-generated lookup error methods (breaks too many // assertions because method oop can change (new method generated during // lookup) methodMap* mm = (methodMap*)method()->map(); return mm->file()->length() == 7 && strncmp(mm->file()->bytes(), "<error>", 7) == 0; }
void nmethod::flush() { BlockProfilerTicks bpt(exclude_nmethod_flush); CSect cs(profilerSemaphore); // for profiler # if GENERATE_DEBUGGING_AIDS if (CheckAssertions) { // for debugging if (nmethodFlushCount && --nmethodFlushCount == 0) warning("nmethodFlushCount"); if (this == (nmethod*)catchThisOne) warning("caught nmethod"); } # endif // EventMarker em("flushing nmethod %#lx %s", this, ""); if (PrintMethodFlushing) { ResourceMark m; char *compilerName = VMString[compiler()]->copy_null_terminated(); lprintf("*flushing %s%s%s-nmethod 0x%lx %d\t(", isZombie() ? "zombie " : "", isAccess() ? "access " : "", compilerName, (void*)(long unsigned)this, (void*)useCount[id]); printName(0, key.selector); lprintf(")"); } // always check the following - tests are really cheap if (flags.flushed) fatal1("nmethod %#lx already flushed", this); if (zone::frame_chain_nesting == 0) fatal("frames must be chained when flushing"); if (frame_chain != NoFrameChain) { // Can't remove an nmethod from deps chains now, because later // programming changes may need to invalidate it. // That is, don't unlink() now. // See comment for makeZombie routine. The comment above is the // "original comment" referred to there. // -- dmu 1/12/03 if (this == recompilee) { // nmethod is being recompiled; cannot really flush yet // em.event.args[1] = "(being recompiled)"; if (PrintMethodFlushing) { lprintf(" (being recompiled)\n"); } } else { // nmethod is currently being executed; cannot flush yet // em.event.args[1] = "(currently active)"; if (PrintMethodFlushing) { lprintf(" (currently active)\n"); } } makeZombie(false); } else { unlink(); // nmethod is not being executed; completely throw away // em.event.args[1] = "(not currently active)"; if (PrintMethodFlushing) { lprintf("\n"); } flatProfiler->flush((char*)this, instsEnd()); zoneLink.remove(); rememberLink.remove(); for (addrDesc* p = locs(), *pend = locsEnd(); p < pend; p++) { if (p->isSendDesc()) { p->asSendDesc(this)->unlink(); } else if (p->isDIDesc()) { p->asDIDesc(this)->dependency()->flush(); } } flags.flushed = 1; // to detect flushing errors # if GENERATE_DEBUGGING_AIDS if (CheckAssertions) { set_oops((oop*)insts(), instsLen()/oopSize, 0); // for quicker detection } # endif Memory->code->free_nmethod(this); } MachineCache::flush_instruction_cache_for_debugging(); }