Commit 3c70631f authored by Shane Snyder's avatar Shane Snyder

Merge branch 'margo-registered-data' into dev-wrap-hg-iface

parents 6a345e9e c34e5501
......@@ -111,6 +111,8 @@ int main(int argc, char **argv)
/* actually start margo */
/***************************************/
mid = margo_init(0, 0, hg_context);
assert(mid);
margo_diag_start(mid);
/* register RPC */
MARGO_REGISTER(mid, "my_rpc", my_rpc_in_t, my_rpc_out_t, NULL, &my_rpc_id);
......@@ -168,11 +170,11 @@ int main(int argc, char **argv)
margo_forward(mid, handle, NULL);
HG_Destroy(handle);
HG_Destroy(handle);
HG_Addr_free(hg_class, svr_addr);
/* shut down everything */
margo_diag_dump(mid, "-", 0);
margo_finalize(mid);
ABT_finalize();
......
......@@ -93,6 +93,7 @@ int main(int argc, char **argv)
/* actually start margo */
mid = margo_init(0, 0, hg_context);
assert(mid);
margo_diag_start(mid);
/* register RPC */
MARGO_REGISTER(mid, "my_rpc", my_rpc_in_t, my_rpc_out_t, my_rpc_ult, MARGO_RPC_ID_IGNORE);
......
......@@ -102,6 +102,8 @@ static void my_rpc_shutdown_ult(hg_handle_t handle)
HG_Destroy(handle);
margo_diag_dump(mid, "-", 0);
/* NOTE: we assume that the server daemon is using
* margo_wait_for_finalize() to suspend until this RPC executes, so there
* is no need to send any extra signal to notify it.
......
......@@ -647,6 +647,25 @@ margo_instance_id margo_hg_handle_get_instance(hg_handle_t h);
*/
int margo_lookup_mplex(margo_instance_id mid, hg_id_t id, uint32_t mplex_id, ABT_pool *pool);
/**
* Enables diagnostic collection on specified Margo instance
*
* @param [in] mid Margo instance
* @returns void
*/
void margo_diag_start(margo_instance_id mid);
/**
* Appends diagnostic statistics (enabled via margo_diag_start()) to specified
* output file.
*
* @param [in] mid Margo instance
* @param [in] file output file ("-" for stdout)
* @param [in] uniquify flag indicating if file name should have additional
* information added to it to make output from different processes unique
* @returns void
*/
void margo_diag_dump(margo_instance_id mid, const char* file, int uniquify);
/**
* macro that registers a function as an RPC.
......
This diff is collapsed.
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