Summary: Using newly added `StaticTracepoint.h`, add a Tracepoint for `RequestContext` switch that could be enabled by compiler flag.
Reviewed By: drarmstr
Differential Revision:
D4238658
fbshipit-source-id:
043a035ba8251b48d7b29d63a2219ad2edda164f
ThreadName.h \
TimeoutQueue.h \
TokenBucket.h \
+ tracing/StaticTracepoint.h \
Traits.h \
Try-inl.h \
Try.h \
*/
#include <folly/io/async/Request.h>
+#include <folly/tracing/StaticTracepoint.h>
#include <glog/logging.h>
std::shared_ptr<RequestContext> ctx) {
auto& curCtx = getStaticContext();
if (ctx != curCtx) {
+ FOLLY_SDT(folly, request_context_switch_before, curCtx.get(), ctx.get());
using std::swap;
if (curCtx) {
curCtx->onUnset();