summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornilabjar <nilabjar@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-09-18 22:42:21 +0000
committernilabjar <nilabjar@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-09-18 22:42:21 +0000
commit5ac9e451095ed296e51cfccb18c81882d89edb20 (patch)
tree16ac13e6cecd7a96f82d4dab86660eeca78dfbf2
parentebc867bfe4458d1ffe3663e4f1feb1db5814b827 (diff)
downloadATCD-5ac9e451095ed296e51cfccb18c81882d89edb20.tar.gz
Tue Sep 18 22:41:16 UTC 2007 Nilabja R <nilabjar@dre.vanderbilt.edu>
-rw-r--r--CIAO/ChangeLog9
-rw-r--r--CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager.mpc2
-rw-r--r--CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.cpp31
-rw-r--r--CIAO/DAnCE/TM_Daemon/DomainDataManager.cpp12
-rw-r--r--CIAO/DAnCE/TM_Daemon/Handler_i.cpp2
5 files changed, 34 insertions, 22 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog
index 2d7544f5036..91e3d6f6c21 100644
--- a/CIAO/ChangeLog
+++ b/CIAO/ChangeLog
@@ -1,3 +1,12 @@
+Tue Sep 18 22:41:16 UTC 2007 Nilabja R <nilabjar@dre.vanderbilt.edu>
+
+ * DAnCE/NodeApplicationManager/NodeApplicationManager.mpc:
+ * DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.cpp:
+
+ * DAnCE/TM_Daemon/DomainDataManager.cpp:
+ * DAnCE/TM_Daemon/Handler_i.cpp:
+ The files changes to introduce QoS Monitoring
+
Mon Sep 17 21:08:46 UTC 2007 Nishanth Shankaran <nshankar@nospam.com>
* examples/space:
diff --git a/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager.mpc b/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager.mpc
index b9a90c7be61..caefd517d5f 100644
--- a/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager.mpc
+++ b/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager.mpc
@@ -11,7 +11,7 @@ project(NodeApplicationManager): ciao_server_dnc, ciao_deployment_svnt, dance_ex
libs += dyninstAPI dwarf elf common symtabAPI iberty
- libpaths += $(DYNINST_ROOT)/$(PLATFORM)/lib /export/home/nilabjar/AppMon/dyninstAPI/dwarf-20070703/libdwarf
+ libpaths += $(DYNINST_ROOT)/$(PLATFORM)/lib /export/home/nilabjar/AppMon/dyninstAPI/dwarf-20070703/libdwarf /export/home/nilabjar/Software/lib/lib
Source_Files {
NodeApplicationManager_Impl.cpp
diff --git a/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.cpp b/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.cpp
index b5adf71371b..b706794eb8f 100644
--- a/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.cpp
+++ b/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.cpp
@@ -24,6 +24,16 @@
# include "NodeApplicationManager_Impl.inl"
#endif /* __ACE_INLINE__ */
+/// Variables for the DynInst API
+BPatch bpatch;
+BPatch_Vector<BPatch_function*> targetFuncs;
+BPatch_Vector<BPatch_point *> *entrypoints;
+BPatch_Vector<BPatch_point *> *exitpoints;
+BPatch_Vector<BPatch_function*> startFuncs;
+BPatch_Vector<BPatch_function*> stopFuncs;
+BPatch_Vector<BPatch_snippet *> startArgs;
+BPatch_Vector<BPatch_snippet *> stopArgs;
+///
bool
CIAO::NodeApplicationManager_Impl_Base::
@@ -1142,13 +1152,9 @@ monitor_qos (const ::Deployment::DeploymentPlan & plan)
}
- ACE_DEBUG ((LM_DEBUG, "Using DynInst\n"));
-
if (func.length () == 0)
return obj;
- BPatch bpatch;
-
// Attach to the program
BPatch_process *appThread =
bpatch.processAttach (this->nodeapp_command_op_.in (), this->process_id_);
@@ -1160,7 +1166,6 @@ monitor_qos (const ::Deployment::DeploymentPlan & plan)
////// Insert your function calls in to the program ....
- BPatch_Vector<BPatch_function*> targetFuncs;
appImage->findFunction(func.c_str (), targetFuncs);
if (targetFuncs.size () == 0)
@@ -1169,27 +1174,25 @@ monitor_qos (const ::Deployment::DeploymentPlan & plan)
{
ACE_DEBUG ((LM_DEBUG, "\t\nTarget Func Found\n"));
- BPatch_Vector<BPatch_point *> *entrypoints =
- targetFuncs[0]->findPoint(BPatch_entry);
+ entrypoints = targetFuncs[0]->findPoint(BPatch_entry);
+
if ((*entrypoints).size() == 0) {
// fprintf(stderr, "Unable to find entry point to \"sleep.\"\n");
ACE_DEBUG ((LM_DEBUG, "\t\nUnable to find entry point\n"));
}
- BPatch_Vector<BPatch_point *> *exitpoints =
- targetFuncs[0]->findPoint(BPatch_exit);
+ exitpoints = targetFuncs[0]->findPoint(BPatch_exit);
+
if ((*exitpoints).size() == 0) {
// fprintf(stderr, "Unable to find exit point to \"sleep.\"\n");
ACE_DEBUG ((LM_DEBUG, "\t\nUnable to find exit point\n"));
}
- BPatch_Vector<BPatch_function*> startFuncs;
appImage->findFunction("start_timing", startFuncs);
if (startFuncs.size () == 0)
ACE_DEBUG ((LM_DEBUG, "start_timing not found\n"));
- BPatch_Vector<BPatch_function*> stopFuncs;
appImage->findFunction("stop_timing", stopFuncs);
if (stopFuncs.size () == 0)
@@ -1202,17 +1205,17 @@ monitor_qos (const ::Deployment::DeploymentPlan & plan)
// appThread->beginInsertionSet ();
- BPatch_Vector<BPatch_snippet *> startArgs;
// Create a function call snippet write(fd, parameter[1], parameter[2])
BPatch_funcCallExpr startCall(*startFuncs[0], startArgs);
// Insert the code into the thread.
if (appThread->insertSnippet(startCall, *entrypoints) == NULL)
ACE_DEBUG ((LM_DEBUG, "\n\nInsert Snippet start WRONG \n\n"));
- BPatch_Vector<BPatch_snippet *> stopArgs;
// Create a function call snippet write(fd, parameter[1], parameter[2])
BPatch_funcCallExpr stopCall(*stopFuncs[0], stopArgs);
- // Insert the code into the thread.
+
+
+ // Insert the code into the thread.
if (appThread->insertSnippet(stopCall, *exitpoints) == NULL)
ACE_DEBUG ((LM_DEBUG, "\n\nERROR in Insert Snippet in stop_timing call \n\n"));
diff --git a/CIAO/DAnCE/TM_Daemon/DomainDataManager.cpp b/CIAO/DAnCE/TM_Daemon/DomainDataManager.cpp
index a3b24bd1c99..8482e036a32 100644
--- a/CIAO/DAnCE/TM_Daemon/DomainDataManager.cpp
+++ b/CIAO/DAnCE/TM_Daemon/DomainDataManager.cpp
@@ -101,19 +101,19 @@ CIAO::DomainDataManager::update_dynamic (const ::Deployment::Domain
}
- // CORBA::Double load;
- // domainSubset.node[0].resource[0].property[0].value >>= load;
- // ACE_DEBUG ((LM_DEBUG, "The current load is %f\n", load));
+// CORBA::Double load;
+// domainSubset.node[0].resource[0].property[0].value >>= load;
+// ACE_DEBUG ((LM_DEBUG, "The current load is %f\n", load));
profile_nodes_[domainSubset.node[0].name.in ()]->stop ();
- // CORBA::ULong response_time;
+// CORBA::ULong response_time;
- // domainSubset.node[0].qos_seq[0].value >>= response_time;
+// domainSubset.node[0].qos_seq[0].value >>= response_time;
- // ACE_DEBUG ((LM_DEBUG, "The response time is %u\n", response_time));
+// ACE_DEBUG ((LM_DEBUG, "The response time is %u\n", response_time));
return 0;
}
diff --git a/CIAO/DAnCE/TM_Daemon/Handler_i.cpp b/CIAO/DAnCE/TM_Daemon/Handler_i.cpp
index f4e68bedbdc..bb400cdbb80 100644
--- a/CIAO/DAnCE/TM_Daemon/Handler_i.cpp
+++ b/CIAO/DAnCE/TM_Daemon/Handler_i.cpp
@@ -28,7 +28,7 @@ void Monitor_Handler_I::get_resource_data_excep (::Messaging::ExceptionHolder
::CORBA::StringSeq elements;
::Deployment::DomainUpdateKind kind = ::Deployment::Add;
- manager_->update_domain (elements, ami_return_val, kind);
+// manager_->update_domain (elements, ami_return_val, kind);
}
void Monitor_Handler_I::monitor_app_QoS (void)