本文整理汇总了C++中Probe::doNotify方法的典型用法代码示例。如果您正苦于以下问题:C++ Probe::doNotify方法的具体用法?C++ Probe::doNotify怎么用?C++ Probe::doNotify使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Probe
的用法示例。
在下文中一共展示了Probe::doNotify方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handleEvent
Process::cb_ret_t Backend::handleEvent(Dyninst::ProcControlAPI::Process::const_ptr curProcess,
Dyninst::ProcControlAPI::Thread::const_ptr curThread,
DysectAPI::Event* dysectEvent) {
Process::cb_ret_t retState = Process::cbDefault;
// Let event know that it was triggered.
// Used for event composition
Walker* proc = (Walker*)curProcess->getData();
if(!proc) {
Err::warn(true, "Missing payload in process object: could not get walker");
} else {
dysectEvent->triggered(curProcess, curThread);
// Find owning probe
Probe* probe = dysectEvent->getOwner();
if(!probe) {
Err::warn(true, "Probe could not be found for event object");
} else {
// If enqueued disabled - stop and await
//if(probe->isDisabled(curProcess)) {
// probe->addWaitingProc(curProcess);
// return Process::cbProcStop;
// //return Process::cbDefault;
//}
// Composed events might require several events being triggered
if(probe->wasTriggered(curProcess, curThread)) {
// Required events indeed triggered
// Evaluate conditions
ConditionResult result;
Err::verbose(true, "Evaluate condition!");
if(probe->evaluateConditions(result, curProcess, curThread) == DysectAPI::OK) {
if(result == ResolvedTrue) {
Err::verbose(true, "Condition satisfied");
Domain* dom = probe->getDomain();
assert(dom != 0);
if(dom->getWaitTime() == Wait::inf) {
// Block strictly, until all processes have shown up
Err::verbose(true, "Enqueuing notification for static domain");
probe->enqueueNotifyPacket();
probe->enqueueAction(curProcess, curThread);
} else if(dom->getWaitTime() != Wait::NoWait) {
if(!DysectAPI::SafeTimer::syncTimerRunning(probe)) {
Err::verbose(true, "Start timer and enqueue: %x", dom->getId());
DysectAPI::SafeTimer::startSyncTimer(probe);
} else {
Err::verbose(true, "Timer already running - just enqueue");
}
if(probe->doNotify()) {
probe->enqueueNotifyPacket();
}
probe->enqueueAction(curProcess, curThread);
} else { // No-wait probe
if(probe->doNotify()) {
probe->notifyTriggered();
}
probe->triggerAction(curProcess, curThread);
}
if(probe->waitForOthers()) {
Err::verbose(true, "Wait for group members");
probe->addWaitingProc(curProcess);
if((dom->getWaitTime() == Wait::inf) && (probe->staticGroupWaiting())) {
Err::verbose(true, "Sending enqueued notifications");
if(probe->doNotify()) {
probe->sendEnqueuedNotifications();
}
probe->sendEnqueuedActions();
}
retState = Process::cbThreadStop;
} else {
Err::verbose(true, "Enable children for probe %x", dom->getId());
probe->enqueueEnable(curProcess);
//Err::verbose(true, "Stopping thread in process %d", curProcess->getPid());
probe->addWaitingProc(curProcess);
//retState = Process::cbThreadStop;
retState = Process::cbProcStop;
//.........这里部分代码省略.........