chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:47:05 +08:00
commit 4f3b7da785
7394 changed files with 2005594 additions and 0 deletions
@@ -0,0 +1,24 @@
#include <legacy/NativeOps.h>
#include <graph/OpContextLifecycleTracker.h>
#include <graph/Context.h>
void recordJavaOpContextAllocation(OpaqueContext *context, int nodeId, long fastpathInSize, long fastpathOutSize, long intermediateResultsSize, long handlesSize, bool hasWorkspace, bool isFastPath) {
#if defined(SD_GCC_FUNCTRACE)
if (context != nullptr) {
sd::graph::OpContextLifecycleTracker::getInstance().recordAllocation(
context, nodeId, fastpathInSize, fastpathOutSize, intermediateResultsSize, handlesSize, hasWorkspace, isFastPath, sd::graph::OpContextSegment::JAVA);
}
#endif
}
void recordJavaOpContextDeallocation(OpaqueContext *context) {
#if defined(SD_GCC_FUNCTRACE)
if (context != nullptr) {
sd::graph::OpContextLifecycleTracker::getInstance().recordDeallocation(context);
}
#endif
}