IProfileMonitor.h#
Fully qualified name: carb/profiler/IProfileMonitor.h
File members: carb/profiler/IProfileMonitor.h
// SPDX-FileCopyrightText: Copyright (c) 2020-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: LicenseRef-NvidiaProprietary
//
// NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
// property and proprietary rights in and to this material, related
// documentation and any modifications thereto. Any use, reproduction,
// disclosure or distribution of this material and related documentation
// without an express license agreement from NVIDIA CORPORATION or
// its affiliates is strictly prohibited.
#pragma once
#include "../Defines.h"
#include <cstdint>
namespace carb
{
namespace profiler
{
struct ProfileEvent
{
const char* eventName;
uint64_t threadId;
uint64_t startTime;
float timeInMs;
uint16_t level;
};
using ProfileEvents = struct ProfileEventsImpl*;
struct IProfileMonitor
{
CARB_PLUGIN_INTERFACE("carb::profiler::IProfileMonitor", 1, 1)
ProfileEvents(CARB_ABI* getLastProfileEvents)();
size_t(CARB_ABI* getLastProfileEventCount)(ProfileEvents events);
ProfileEvent*(CARB_ABI* getLastProfileEventsData)(ProfileEvents events);
uint32_t(CARB_ABI* getProfileThreadCount)(ProfileEvents events);
uint64_t const*(CARB_ABI* getProfileThreadIds)(ProfileEvents events);
void(CARB_ABI* releaseLastProfileEvents)(ProfileEvents events);
uint64_t(CARB_ABI* getMainThreadId)(ProfileEvents events);
void(CARB_ABI* markFrameEnd)();
};
} // namespace profiler
} // namespace carb