folly/folly/tracing/AsyncStack-inl.h

/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * 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.
 */

#pragma once

namespace folly {

inline void checkAsyncStackFrameIsActive(
    [[maybe_unused]] const folly::AsyncStackFrame& frame) noexcept {}

inline void activateAsyncStackFrame(
    folly::AsyncStackRoot& root, folly::AsyncStackFrame& frame) noexcept {}

inline void deactivateAsyncStackFrame(folly::AsyncStackFrame& frame) noexcept {}

inline void pushAsyncStackFrameCallerCallee(
    folly::AsyncStackFrame& callerFrame,
    folly::AsyncStackFrame& calleeFrame) noexcept {}

inline void popAsyncStackFrameCallee(
    folly::AsyncStackFrame& calleeFrame) noexcept {}

inline size_t getAsyncStackTraceFromInitialFrame(
    folly::AsyncStackFrame* initialFrame,
    std::uintptr_t* addresses,
    size_t maxAddresses) {}

#if FOLLY_HAS_COROUTINES

template <typename Promise>
void resumeCoroutineWithNewAsyncStackRoot(
    coro::coroutine_handle<Promise> h) noexcept {
  resumeCoroutineWithNewAsyncStackRoot(h, h.promise().getAsyncFrame());
}

#endif

inline AsyncStackFrame* AsyncStackFrame::getParentFrame() noexcept {}

inline const AsyncStackFrame* AsyncStackFrame::getParentFrame() const noexcept {}

inline void AsyncStackFrame::setParentFrame(AsyncStackFrame& frame) noexcept {}

inline AsyncStackRoot* AsyncStackFrame::getStackRoot() noexcept {}

inline void AsyncStackFrame::setReturnAddress(void* p) noexcept {}

inline void* AsyncStackFrame::getReturnAddress() const noexcept {}

inline void AsyncStackRoot::setTopFrame(AsyncStackFrame& frame) noexcept {}

inline AsyncStackFrame* AsyncStackRoot::getTopFrame() const noexcept {}

inline void AsyncStackRoot::setStackFrameContext(
    void* framePtr, void* ip) noexcept {}

inline void* AsyncStackRoot::getStackFramePointer() const noexcept {}

inline void* AsyncStackRoot::getReturnAddress() const noexcept {}

inline const AsyncStackRoot* AsyncStackRoot::getNextRoot() const noexcept {}

inline void AsyncStackRoot::setNextRoot(AsyncStackRoot* next) noexcept {}

} // namespace folly