Skip to content

Commit 8996a46

Browse files
PhilMillerphilmiller-charmworksmatthiasdiener
authored andcommitted
Tracing: Fix message creation tracing for inline EPs (#2178)
Co-authored-by: Phil Miller (Charmworks) <[email protected]> Co-authored-by: Matthias Diener <[email protected]>
1 parent a71a020 commit 8996a46

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/ck-core/cklocation.C

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3052,10 +3052,8 @@ void CkLocMgr::prepMsg(CkArrayMessage* msg, CkArrayID mgr, const CkArrayIndex& i
30523052

30533053
checkInBounds(idx);
30543054

3055-
if (type == CkDeliver_queue)
3056-
{
3057-
_TRACE_CREATION_DETAILED(env, msg->array_ep());
3058-
}
3055+
// Trace this send for Projections
3056+
_TRACE_CREATION_DETAILED(env, msg->array_ep());
30593057

30603058
CmiUInt8 id;
30613059
if (lookupID(idx, id))

src/xlat-i/xi-Entry.C

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,8 +545,15 @@ void Entry::genArrayDefs(XStr& str) {
545545
str << " ckCheck();\n";
546546
XStr inlineCall;
547547
if (!isNoTrace())
548+
// Create a dummy envelope to represent the "message send" to the local/inline method
549+
// so that Projections can trace the method back to its caller
548550
inlineCall
549-
<< " _TRACE_BEGIN_EXECUTE_DETAILED(0,ForArrayEltMsg,(" << epIdx()
551+
<< " envelope env;\n"
552+
<< " env.setMsgtype(ForArrayEltMsg);\n"
553+
<< " env.setTotalsize(0);\n"
554+
<< " _TRACE_CREATION_DETAILED(&env, " << epIdx() << ");\n"
555+
<< " _TRACE_CREATION_DONE(1);\n"
556+
<< " _TRACE_BEGIN_EXECUTE_DETAILED(CpvAccess(curPeEvent),ForArrayEltMsg,(" << epIdx()
550557
<< "),CkMyPe(), 0, ((CkArrayIndex&)ckGetIndex()).getProjectionID(), obj);\n";
551558
if (isAppWork()) inlineCall << " _TRACE_BEGIN_APPWORK();\n";
552559
inlineCall << "#if CMK_LBDB_ON\n";

0 commit comments

Comments
 (0)