Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
ttd: undoing custom TTD tracking for async-wrap
Browse files Browse the repository at this point in the history
undoing custom TTD tracking for async-wrap to eliminate merge
conflicts and set up for using AliasedBuffer to track these
changes.  Once AliasedBuffer is merged in, we'll do the TTD
tracking in AliasedBuffer's SetValue() method.

PR-URL: #392
Reviewed-By: Hitesh Kanwathirtha <hiteshk@microsoft.com>
Reviewed-By: Jack Horton <jack.horton@microsoft.com>
  • Loading branch information
Mike Kaufman authored and MSLaguana committed Sep 26, 2017
1 parent b54102b commit 96ec109
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
20 changes: 0 additions & 20 deletions src/env-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,6 @@ inline void Environment::AsyncHooks::push_ids(double async_id,
uid_fields_[kCurrentTriggerId] });
uid_fields_[kCurrentAsyncId] = async_id;
uid_fields_[kCurrentTriggerId] = trigger_id;

#if ENABLE_TTD_NODE
this->AsyncWrapId_TTDRecord();
#endif
}

inline bool Environment::AsyncHooks::pop_ids(double async_id) {
Expand Down Expand Up @@ -172,10 +168,6 @@ inline bool Environment::AsyncHooks::pop_ids(double async_id) {
uid_fields_[kCurrentAsyncId] = ids.async_id;
uid_fields_[kCurrentTriggerId] = ids.trigger_id;

#if ENABLE_TTD_NODE
this->AsyncWrapId_TTDRecord();
#endif

return !ids_stack_.empty();
}

Expand All @@ -188,10 +180,6 @@ inline void Environment::AsyncHooks::clear_id_stack() {
ids_stack_.pop();
uid_fields_[kCurrentAsyncId] = 0;
uid_fields_[kCurrentTriggerId] = 0;

#if ENABLE_TTD_NODE
this->AsyncWrapId_TTDRecord();
#endif
}

inline Environment::AsyncHooks::InitScope::InitScope(
Expand Down Expand Up @@ -464,20 +452,12 @@ inline double Environment::get_init_trigger_id() {
double tid = uid_fields[AsyncHooks::kInitTriggerId];
uid_fields[AsyncHooks::kInitTriggerId] = 0;

#if ENABLE_TTD_NODE
this->async_hooks()->AsyncWrapId_TTDRecord();
#endif

if (tid <= 0) tid = current_async_id();
return tid;
}

inline void Environment::set_init_trigger_id(const double id) {
async_hooks()->uid_fields()[AsyncHooks::kInitTriggerId] = id;

#if ENABLE_TTD_NODE
this->async_hooks()->AsyncWrapId_TTDRecord();
#endif
}

inline double* Environment::heap_statistics_buffer() const {
Expand Down
12 changes: 0 additions & 12 deletions src/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -396,18 +396,6 @@ class Environment {
kUidFieldsCount,
};

#if ENABLE_TTD_NODE
// Work around AsyncHooks id hack
v8::Float64Array* uid_fields_ttdRef;

void AsyncWrapId_TTDRecord() {
if ((s_doTTRecord || s_doTTReplay) && (uid_fields_ttdRef != nullptr)) {
const int modlength = kUidFieldsCount * sizeof(double);
uid_fields_ttdRef->Buffer()->TTDRawBufferModifyNotifySync(0, modlength);
}
}
#endif

AsyncHooks() = delete;

inline AliasedBuffer<uint32_t, v8::Uint32Array>& fields();
Expand Down

0 comments on commit 96ec109

Please sign in to comment.