Skip to content

Commit

Permalink
#1596: active: rename envelope flag
Browse files Browse the repository at this point in the history
  • Loading branch information
lifflander committed Dec 21, 2021
1 parent 5e2e655 commit 832480a
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 17 deletions.
5 changes: 3 additions & 2 deletions src/vt/messaging/active.cc
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,9 @@ EventType ActiveMessenger::sendMsgBytes(
if (theContext()->getTask() != nullptr) {
auto lb = theContext()->getTask()->get<ctx::LBStats>();
if (lb) {
auto const no_stats = envelopeNoBareHandlerCommStats(msg->env);
if (not no_stats) {
auto const already_recorded =
envelopeCommStatsRecordedAboveBareHandler(msg->env);
if (not already_recorded) {
auto dest_elm_id = elm::ElmIDBits::createBareHandler(dest);
theContext()->getTask()->send(dest_elm_id, msg_size);
}
Expand Down
2 changes: 1 addition & 1 deletion src/vt/messaging/envelope/envelope_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ struct ActiveEnvelope {

/// Used to denote that the message's bare handlers shouldn't record
/// communication statistics due to redundancy
bool no_bare_handler_comm_stats : 1;
bool comm_stats_recorded_above_bare_handler : 1;
};

}} /* end namespace vt::messaging */
Expand Down
8 changes: 4 additions & 4 deletions src/vt/messaging/envelope/envelope_set.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,12 @@ inline void envelopeSetHasBeenSerialized(Env& env, bool has_been_serialized);
* stats for LB
*
* \param[in,out] env the envelope
* \param[in] no_bare_handler_comm_stats value indicating message shouldn't
* record bare handler stats
* \param[in] comm_stats_recorded_above_bare_handler value indicating message
* shouldn't record bare handler stats
*/
template <typename Env>
inline void envelopeSetNoBareHandlerCommStats(
Env& env, bool no_bare_handler_comm_stats
inline void envelopeSetCommStatsRecordedAboveBareHandler(
Env& env, bool comm_stats_recorded_above_bare_handler
);

/**
Expand Down
8 changes: 4 additions & 4 deletions src/vt/messaging/envelope/envelope_set.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@ inline void envelopeSetHasBeenSerialized(Env& env, bool has_been_serialized) {
}

template <typename Env>
inline void envelopeSetNoBareHandlerCommStats(
Env& env, bool no_bare_handler_comm_stats
inline void envelopeSetCommStatsRecordedAboveBareHandler(
Env& env, bool comm_stats_recorded_above_bare_handler
) {
reinterpret_cast<Envelope*>(&env)->no_bare_handler_comm_stats =
no_bare_handler_comm_stats;
reinterpret_cast<Envelope*>(&env)->comm_stats_recorded_above_bare_handler =
comm_stats_recorded_above_bare_handler;
}

template <typename Env>
Expand Down
2 changes: 1 addition & 1 deletion src/vt/messaging/envelope/envelope_setup.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ inline void envelopeInit(Env& env) {
envelopeSetTraceEvent(env, trace::no_trace_event);
#endif
envelopeSetHasBeenSerialized(env, false);
envelopeSetNoBareHandlerCommStats(env, false);
envelopeSetCommStatsRecordedAboveBareHandler(env, false);
}

inline void envelopeInitEmpty(Envelope& env) {
Expand Down
2 changes: 1 addition & 1 deletion src/vt/messaging/envelope/envelope_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ inline bool envelopeIsLocked(Env& env);
* \param[in] env the envelope
*/
template <typename Env>
inline bool envelopeNoBareHandlerCommStats(Env& env);
inline bool envelopeCommStatsRecordedAboveBareHandler(Env& env);

}} //end namespace vt::messaging

Expand Down
5 changes: 3 additions & 2 deletions src/vt/messaging/envelope/envelope_test.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,9 @@ inline bool envelopeIsLocked(Env& env) {
}

template <typename Env>
inline bool envelopeNoBareHandlerCommStats(Env& env) {
return reinterpret_cast<Envelope const*>(&env)->no_bare_handler_comm_stats;
inline bool envelopeCommStatsRecordedAboveBareHandler(Env& env) {
return reinterpret_cast<Envelope const*>(&env)->
comm_stats_recorded_above_bare_handler;
}

}} //end namespace vt::messaging
Expand Down
2 changes: 1 addition & 1 deletion src/vt/objgroup/manager.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ void ObjGroupManager::send(ProxyElmType<ObjT> proxy, MsgSharedPtr<MsgT> msg) {

// set bit so it isn't recorded as it routes through bare
// handlers
envelopeSetNoBareHandlerCommStats(msg->env, true);
envelopeSetCommStatsRecordedAboveBareHandler(msg->env, true);

if (theContext()->getTask() != nullptr) {
auto dest_elm_id = elm::ElmIDBits::createObjGroup(proxy_bits, dest_node);
Expand Down
2 changes: 1 addition & 1 deletion src/vt/vrt/collection/manager.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,7 @@ messaging::PendingSend CollectionManager::sendMsgUntypedHandler(
# endif

// set bit so it isn't recorded as it routes through bare handlers
envelopeSetNoBareHandlerCommStats(msg->env, true);
envelopeSetCommStatsRecordedAboveBareHandler(msg->env, true);

# if vt_check_enabled(trace_enabled)
// Create the trace creation event here to connect it a higher semantic
Expand Down

0 comments on commit 832480a

Please sign in to comment.