Commit f74bfffc authored by Alison Tsai's avatar Alison Tsai Committed by Facebook Github Bot

macro to enable scoped trace section functionality

Summary: Add a macro to enable optional scoped trace section functionality (user-defined). This macro will have no effect unless configured to do so. This change means that if proxygen is being upgraded, folly must also be updated.

Reviewed By: mzlee

Differential Revision: D5635123

fbshipit-source-id: 7db17f6ae8c0d1484cf9fad043eb42717279bd0a
parent 116ae463
......@@ -428,6 +428,7 @@ nobase_follyinclude_HEADERS = \
TimeoutQueue.h \
TokenBucket.h \
tracing/StaticTracepoint.h \
tracing/ScopedTraceSection.h \
Traits.h \
Try-inl.h \
Try.h \
......
/*
* Copyright 2017-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* This macro enables FbSystrace usage in production for fb4a. When
* FOLLY_SCOPED_TRACE_SECTION_HEADER is defined then a trace section is started
* and later automatically terminated at the close of the scope it is called in.
* In all other cases no action is taken.
*/
#pragma once
#if defined(FOLLY_SCOPED_TRACE_SECTION_HEADER)
#include FOLLY_SCOPED_TRACE_SECTION_HEADER
#else
#define FOLLY_SCOPED_TRACE_SECTION(arg, ...) \
do { \
} while (0)
#endif
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