Skip to content

Instantly share code, notes, and snippets.

@leculver
Created May 18, 2016 19:33
Show Gist options
  • Save leculver/948f6eb85411d52decd740841ea73675 to your computer and use it in GitHub Desktop.
Save leculver/948f6eb85411d52decd740841ea73675 to your computer and use it in GitHub Desktop.
#include "palrt.h"
#include "pal.h"
#include "stdlib.h"
#include "pal_mstypes.h"
#include "pal_error.h"
#include <new>
#include <memory.h>
bool ResizeBuffer(char *&buffer, int& size, int currLen, int newSize, bool &fixedBuffer)
{
newSize *= 1.5;
_ASSERTE(newSize > size); // check for overflow
if (newSize < 32)
newSize = 32;
char *newBuffer = new char[newSize];
memcpy(newBuffer, buffer, currLen);
if (!fixedBuffer)
delete[] buffer;
buffer = newBuffer;
size = newSize;
fixedBuffer = false;
return true;
}
bool WriteToBuffer(const BYTE *src, int len, char *&buffer, int& offset, int& size, bool &fixedBuffer)
{
if (offset + len)
{
if (!ResizeBuffer(buffer, size, offset, size + len, fixedBuffer))
return false;
}
memcpy(buffer + offset, src, len);
offset += len;
return true;
}
bool WriteToBuffer(PCWSTR str, char *&buffer, int& offset, int& size, bool &fixedBuffer)
{
int byteCount = (PAL_wcslen(str) + 1) * sizeof(*str);
if (offset + byteCount)
{
if (!ResizeBuffer(buffer, size, offset, size + byteCount, fixedBuffer))
return false;
}
memcpy(buffer + offset, str, byteCount);
offset += byteCount;
return true;
}
bool WriteToBuffer(const char *str, char *&buffer, int& offset, int& size, bool &fixedBuffer)
{
int len = strlen(str) + 1;
if (offset + len)
{
if (!ResizeBuffer(buffer, size, offset, size + len, fixedBuffer))
return false;
}
memcpy(buffer + offset, str, len);
offset += len;
return true;
}
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
/******************************************************************
DO NOT MODIFY. AUTOGENERATED FILE.
This file is generated using the logic from <root>/src/scripts/genXplatLttng.py
******************************************************************/
#define TRACEPOINT_DEFINE
#define TRACEPOINT_PROBE_DYNAMIC_LINKAGE
#include "stdlib.h"
#include "pal_mstypes.h"
#include "pal_error.h"
#include "pal.h"
#define PAL_free free
#define PAL_realloc realloc
#include "pal/stackstring.hpp"
#include "tpdotnetruntime.h"
#ifndef tracepoint_enabled
#define tracepoint_enabled(provider, name) TRUE
#define do_tracepoint tracepoint
#endif
bool ResizeBuffer(char *&buffer, int& size, int currLen, int newSize, bool &fixedBuffer);
bool WriteToBuffer(PCWSTR str, char *&buffer, int& offset, int& size, bool &fixedBuffer);
bool WriteToBuffer(const char *str, char *&buffer, int& offset, int& size, bool &fixedBuffer);
bool WriteToBuffer(const BYTE *src, int len, char *&buffer, int& offset, int& size, bool &fixedBuffer);
template <typename T>
bool WriteToBuffer(const T &value, char *&buffer, int& offset, int& size, bool &fixedBuffer)
{
if (sizeof(T) + offset > size)
{
if (!ResizeBuffer(buffer, size, offset, size + sizeof(T), fixedBuffer))
return false;
}
*(T *)(buffer + offset) = value;
offset += sizeof(T);
return true;
}
extern "C" BOOL EventXplatEnabledGCStart(){ return tracepoint_enabled(DotNETRuntime, GCStart); }
extern "C" ULONG FireEtXplatGCStart(
const unsigned int Count,
const unsigned int Reason)
{
if (!EventXplatEnabledGCStart())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCStart,
Count,
Reason);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCStart_V1(){ return tracepoint_enabled(DotNETRuntime, GCStart_V1); }
extern "C" ULONG FireEtXplatGCStart_V1(
const unsigned int Count,
const unsigned int Depth,
const unsigned int Reason,
const unsigned int Type,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledGCStart_V1())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCStart_V1,
Count,
Depth,
Reason,
Type,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCStart_V2(){ return tracepoint_enabled(DotNETRuntime, GCStart_V2); }
extern "C" ULONG FireEtXplatGCStart_V2(
const unsigned int Count,
const unsigned int Depth,
const unsigned int Reason,
const unsigned int Type,
const unsigned short ClrInstanceID,
const unsigned __int64 ClientSequenceNumber)
{
if (!EventXplatEnabledGCStart_V2())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCStart_V2,
Count,
Depth,
Reason,
Type,
ClrInstanceID,
ClientSequenceNumber);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCEnd(){ return tracepoint_enabled(DotNETRuntime, GCEnd); }
extern "C" ULONG FireEtXplatGCEnd(
const unsigned int Count,
const unsigned short Depth)
{
if (!EventXplatEnabledGCEnd())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCEnd,
Count,
Depth);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCEnd_V1(){ return tracepoint_enabled(DotNETRuntime, GCEnd_V1); }
extern "C" ULONG FireEtXplatGCEnd_V1(
const unsigned int Count,
const unsigned int Depth,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledGCEnd_V1())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCEnd_V1,
Count,
Depth,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCRestartEEEnd(){ return tracepoint_enabled(DotNETRuntime, GCRestartEEEnd); }
extern "C" ULONG FireEtXplatGCRestartEEEnd(
)
{
if (!EventXplatEnabledGCRestartEEEnd())
return ERROR_SUCCESS;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCRestartEEEnd_V1(){ return tracepoint_enabled(DotNETRuntime, GCRestartEEEnd_V1); }
extern "C" ULONG FireEtXplatGCRestartEEEnd_V1(
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledGCRestartEEEnd_V1())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCRestartEEEnd_V1,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCHeapStats(){ return tracepoint_enabled(DotNETRuntime, GCHeapStats); }
extern "C" ULONG FireEtXplatGCHeapStats(
const unsigned __int64 GenerationSize0,
const unsigned __int64 TotalPromotedSize0,
const unsigned __int64 GenerationSize1,
const unsigned __int64 TotalPromotedSize1,
const unsigned __int64 GenerationSize2,
const unsigned __int64 TotalPromotedSize2,
const unsigned __int64 GenerationSize3,
const unsigned __int64 TotalPromotedSize3,
const unsigned __int64 FinalizationPromotedSize,
const unsigned __int64 FinalizationPromotedCount,
const unsigned int PinnedObjectCount,
const unsigned int SinkBlockCount,
const unsigned int GCHandleCount)
{
if (!EventXplatEnabledGCHeapStats())
return ERROR_SUCCESS;
char stackBuffer[92];
char *buffer = stackBuffer;
int offset = 0;
int size = 92;
bool fixedBuffer = true;
bool success = true;
success &= WriteToBuffer(GenerationSize0, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(TotalPromotedSize0, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(GenerationSize1, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(TotalPromotedSize1, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(GenerationSize2, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(TotalPromotedSize2, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(GenerationSize3, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(TotalPromotedSize3, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(FinalizationPromotedSize, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(FinalizationPromotedCount, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(PinnedObjectCount, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(SinkBlockCount, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(GCHandleCount, buffer, offset, size, fixedBuffer);
if (!success)
{
if (!fixedBuffer)
delete[] buffer;
return ERROR_WRITE_FAULT;
}
do_tracepoint(DotNETRuntime, GCHeapStats, offset, buffer);
if (!fixedBuffer)
delete[] buffer;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCHeapStats_V1(){ return tracepoint_enabled(DotNETRuntime, GCHeapStats_V1); }
extern "C" ULONG FireEtXplatGCHeapStats_V1(
const unsigned __int64 GenerationSize0,
const unsigned __int64 TotalPromotedSize0,
const unsigned __int64 GenerationSize1,
const unsigned __int64 TotalPromotedSize1,
const unsigned __int64 GenerationSize2,
const unsigned __int64 TotalPromotedSize2,
const unsigned __int64 GenerationSize3,
const unsigned __int64 TotalPromotedSize3,
const unsigned __int64 FinalizationPromotedSize,
const unsigned __int64 FinalizationPromotedCount,
const unsigned int PinnedObjectCount,
const unsigned int SinkBlockCount,
const unsigned int GCHandleCount,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledGCHeapStats_V1())
return ERROR_SUCCESS;
char stackBuffer[94];
char *buffer = stackBuffer;
int offset = 0;
int size = 94;
bool fixedBuffer = true;
bool success = true;
success &= WriteToBuffer(GenerationSize0, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(TotalPromotedSize0, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(GenerationSize1, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(TotalPromotedSize1, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(GenerationSize2, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(TotalPromotedSize2, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(GenerationSize3, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(TotalPromotedSize3, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(FinalizationPromotedSize, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(FinalizationPromotedCount, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(PinnedObjectCount, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(SinkBlockCount, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(GCHandleCount, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer);
if (!success)
{
if (!fixedBuffer)
delete[] buffer;
return ERROR_WRITE_FAULT;
}
do_tracepoint(DotNETRuntime, GCHeapStats_V1, offset, buffer);
if (!fixedBuffer)
delete[] buffer;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCCreateSegment(){ return tracepoint_enabled(DotNETRuntime, GCCreateSegment); }
extern "C" ULONG FireEtXplatGCCreateSegment(
const unsigned __int64 Address,
const unsigned __int64 Size,
const unsigned int Type)
{
if (!EventXplatEnabledGCCreateSegment())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCCreateSegment,
Address,
Size,
Type);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCCreateSegment_V1(){ return tracepoint_enabled(DotNETRuntime, GCCreateSegment_V1); }
extern "C" ULONG FireEtXplatGCCreateSegment_V1(
const unsigned __int64 Address,
const unsigned __int64 Size,
const unsigned int Type,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledGCCreateSegment_V1())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCCreateSegment_V1,
Address,
Size,
Type,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCFreeSegment(){ return tracepoint_enabled(DotNETRuntime, GCFreeSegment); }
extern "C" ULONG FireEtXplatGCFreeSegment(
const unsigned __int64 Address)
{
if (!EventXplatEnabledGCFreeSegment())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCFreeSegment,
Address);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCFreeSegment_V1(){ return tracepoint_enabled(DotNETRuntime, GCFreeSegment_V1); }
extern "C" ULONG FireEtXplatGCFreeSegment_V1(
const unsigned __int64 Address,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledGCFreeSegment_V1())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCFreeSegment_V1,
Address,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCRestartEEBegin(){ return tracepoint_enabled(DotNETRuntime, GCRestartEEBegin); }
extern "C" ULONG FireEtXplatGCRestartEEBegin(
)
{
if (!EventXplatEnabledGCRestartEEBegin())
return ERROR_SUCCESS;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCRestartEEBegin_V1(){ return tracepoint_enabled(DotNETRuntime, GCRestartEEBegin_V1); }
extern "C" ULONG FireEtXplatGCRestartEEBegin_V1(
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledGCRestartEEBegin_V1())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCRestartEEBegin_V1,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCSuspendEEEnd(){ return tracepoint_enabled(DotNETRuntime, GCSuspendEEEnd); }
extern "C" ULONG FireEtXplatGCSuspendEEEnd(
)
{
if (!EventXplatEnabledGCSuspendEEEnd())
return ERROR_SUCCESS;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCSuspendEEEnd_V1(){ return tracepoint_enabled(DotNETRuntime, GCSuspendEEEnd_V1); }
extern "C" ULONG FireEtXplatGCSuspendEEEnd_V1(
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledGCSuspendEEEnd_V1())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCSuspendEEEnd_V1,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCSuspendEEBegin(){ return tracepoint_enabled(DotNETRuntime, GCSuspendEEBegin); }
extern "C" ULONG FireEtXplatGCSuspendEEBegin(
const unsigned short Reason)
{
if (!EventXplatEnabledGCSuspendEEBegin())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCSuspendEEBegin,
Reason);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCSuspendEEBegin_V1(){ return tracepoint_enabled(DotNETRuntime, GCSuspendEEBegin_V1); }
extern "C" ULONG FireEtXplatGCSuspendEEBegin_V1(
const unsigned int Reason,
const unsigned int Count,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledGCSuspendEEBegin_V1())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCSuspendEEBegin_V1,
Reason,
Count,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCAllocationTick(){ return tracepoint_enabled(DotNETRuntime, GCAllocationTick); }
extern "C" ULONG FireEtXplatGCAllocationTick(
const unsigned int AllocationAmount,
const unsigned int AllocationKind)
{
if (!EventXplatEnabledGCAllocationTick())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCAllocationTick,
AllocationAmount,
AllocationKind);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCAllocationTick_V1(){ return tracepoint_enabled(DotNETRuntime, GCAllocationTick_V1); }
extern "C" ULONG FireEtXplatGCAllocationTick_V1(
const unsigned int AllocationAmount,
const unsigned int AllocationKind,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledGCAllocationTick_V1())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCAllocationTick_V1,
AllocationAmount,
AllocationKind,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCAllocationTick_V2(){ return tracepoint_enabled(DotNETRuntime, GCAllocationTick_V2); }
extern "C" ULONG FireEtXplatGCAllocationTick_V2(
const unsigned int AllocationAmount,
const unsigned int AllocationKind,
const unsigned short ClrInstanceID,
const unsigned __int64 AllocationAmount64,
const void* TypeID,
PCWSTR TypeName,
const unsigned int HeapIndex)
{
if (!EventXplatEnabledGCAllocationTick_V2())
return ERROR_SUCCESS;
INT TypeName_path_size = -1;
PathCharString TypeName_PS;
INT TypeName_full_name_path_size = (PAL_wcslen(TypeName) + 1)*sizeof(WCHAR);
CHAR* TypeName_full_name = TypeName_PS.OpenStringBuffer(TypeName_full_name_path_size );
if (TypeName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
TypeName_path_size = WideCharToMultiByte( CP_ACP, 0, TypeName, -1, TypeName_full_name, TypeName_full_name_path_size, NULL, NULL );
_ASSERTE(TypeName_path_size < TypeName_full_name_path_size );
TypeName_PS.CloseBuffer(TypeName_path_size );
if( TypeName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
GCAllocationTick_V2,
AllocationAmount,
AllocationKind,
ClrInstanceID,
AllocationAmount64,
(const size_t) TypeID,
TypeName_full_name,
HeapIndex);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCAllocationTick_V3(){ return tracepoint_enabled(DotNETRuntime, GCAllocationTick_V3); }
extern "C" ULONG FireEtXplatGCAllocationTick_V3(
const unsigned int AllocationAmount,
const unsigned int AllocationKind,
const unsigned short ClrInstanceID,
const unsigned __int64 AllocationAmount64,
const void* TypeID,
PCWSTR TypeName,
const unsigned int HeapIndex,
const void* Address)
{
if (!EventXplatEnabledGCAllocationTick_V3())
return ERROR_SUCCESS;
INT TypeName_path_size = -1;
PathCharString TypeName_PS;
INT TypeName_full_name_path_size = (PAL_wcslen(TypeName) + 1)*sizeof(WCHAR);
CHAR* TypeName_full_name = TypeName_PS.OpenStringBuffer(TypeName_full_name_path_size );
if (TypeName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
TypeName_path_size = WideCharToMultiByte( CP_ACP, 0, TypeName, -1, TypeName_full_name, TypeName_full_name_path_size, NULL, NULL );
_ASSERTE(TypeName_path_size < TypeName_full_name_path_size );
TypeName_PS.CloseBuffer(TypeName_path_size );
if( TypeName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
GCAllocationTick_V3,
AllocationAmount,
AllocationKind,
ClrInstanceID,
AllocationAmount64,
(const size_t) TypeID,
TypeName_full_name,
HeapIndex,
(const size_t) Address);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCCreateConcurrentThread(){ return tracepoint_enabled(DotNETRuntime, GCCreateConcurrentThread); }
extern "C" ULONG FireEtXplatGCCreateConcurrentThread(
)
{
if (!EventXplatEnabledGCCreateConcurrentThread())
return ERROR_SUCCESS;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCCreateConcurrentThread_V1(){ return tracepoint_enabled(DotNETRuntime, GCCreateConcurrentThread_V1); }
extern "C" ULONG FireEtXplatGCCreateConcurrentThread_V1(
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledGCCreateConcurrentThread_V1())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCCreateConcurrentThread_V1,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCTerminateConcurrentThread(){ return tracepoint_enabled(DotNETRuntime, GCTerminateConcurrentThread); }
extern "C" ULONG FireEtXplatGCTerminateConcurrentThread(
)
{
if (!EventXplatEnabledGCTerminateConcurrentThread())
return ERROR_SUCCESS;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCTerminateConcurrentThread_V1(){ return tracepoint_enabled(DotNETRuntime, GCTerminateConcurrentThread_V1); }
extern "C" ULONG FireEtXplatGCTerminateConcurrentThread_V1(
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledGCTerminateConcurrentThread_V1())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCTerminateConcurrentThread_V1,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCFinalizersEnd(){ return tracepoint_enabled(DotNETRuntime, GCFinalizersEnd); }
extern "C" ULONG FireEtXplatGCFinalizersEnd(
const unsigned int Count)
{
if (!EventXplatEnabledGCFinalizersEnd())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCFinalizersEnd,
Count);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCFinalizersEnd_V1(){ return tracepoint_enabled(DotNETRuntime, GCFinalizersEnd_V1); }
extern "C" ULONG FireEtXplatGCFinalizersEnd_V1(
const unsigned int Count,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledGCFinalizersEnd_V1())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCFinalizersEnd_V1,
Count,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCFinalizersBegin(){ return tracepoint_enabled(DotNETRuntime, GCFinalizersBegin); }
extern "C" ULONG FireEtXplatGCFinalizersBegin(
)
{
if (!EventXplatEnabledGCFinalizersBegin())
return ERROR_SUCCESS;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCFinalizersBegin_V1(){ return tracepoint_enabled(DotNETRuntime, GCFinalizersBegin_V1); }
extern "C" ULONG FireEtXplatGCFinalizersBegin_V1(
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledGCFinalizersBegin_V1())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCFinalizersBegin_V1,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledBulkType(){ return tracepoint_enabled(DotNETRuntime, BulkType); }
extern "C" ULONG FireEtXplatBulkType(
const unsigned int Count,
const unsigned short ClrInstanceID,
int Values_ElementSize,
const void* Values)
{
if (!EventXplatEnabledBulkType())
return ERROR_SUCCESS;
char stackBuffer[38];
char *buffer = stackBuffer;
int offset = 0;
int size = 38;
bool fixedBuffer = true;
bool success = true;
success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer((const BYTE *)Values, (int)Values_ElementSize * (int)Count, buffer, offset, size, fixedBuffer);
if (!success)
{
if (!fixedBuffer)
delete[] buffer;
return ERROR_WRITE_FAULT;
}
do_tracepoint(DotNETRuntime, BulkType, offset, buffer);
if (!fixedBuffer)
delete[] buffer;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCBulkRootEdge(){ return tracepoint_enabled(DotNETRuntime, GCBulkRootEdge); }
extern "C" ULONG FireEtXplatGCBulkRootEdge(
const unsigned int Index,
const unsigned int Count,
const unsigned short ClrInstanceID,
int Values_ElementSize,
const void* Values)
{
if (!EventXplatEnabledGCBulkRootEdge())
return ERROR_SUCCESS;
char stackBuffer[42];
char *buffer = stackBuffer;
int offset = 0;
int size = 42;
bool fixedBuffer = true;
bool success = true;
success &= WriteToBuffer(Index, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer((const BYTE *)Values, (int)Values_ElementSize * (int)Count, buffer, offset, size, fixedBuffer);
if (!success)
{
if (!fixedBuffer)
delete[] buffer;
return ERROR_WRITE_FAULT;
}
do_tracepoint(DotNETRuntime, GCBulkRootEdge, offset, buffer);
if (!fixedBuffer)
delete[] buffer;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCBulkRootConditionalWeakTableElementEdge(){ return tracepoint_enabled(DotNETRuntime, GCBulkRootConditionalWeakTableElementEdge); }
extern "C" ULONG FireEtXplatGCBulkRootConditionalWeakTableElementEdge(
const unsigned int Index,
const unsigned int Count,
const unsigned short ClrInstanceID,
int Values_ElementSize,
const void* Values)
{
if (!EventXplatEnabledGCBulkRootConditionalWeakTableElementEdge())
return ERROR_SUCCESS;
char stackBuffer[42];
char *buffer = stackBuffer;
int offset = 0;
int size = 42;
bool fixedBuffer = true;
bool success = true;
success &= WriteToBuffer(Index, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer((const BYTE *)Values, (int)Values_ElementSize * (int)Count, buffer, offset, size, fixedBuffer);
if (!success)
{
if (!fixedBuffer)
delete[] buffer;
return ERROR_WRITE_FAULT;
}
do_tracepoint(DotNETRuntime, GCBulkRootConditionalWeakTableElementEdge, offset, buffer);
if (!fixedBuffer)
delete[] buffer;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCBulkNode(){ return tracepoint_enabled(DotNETRuntime, GCBulkNode); }
extern "C" ULONG FireEtXplatGCBulkNode(
const unsigned int Index,
const unsigned int Count,
const unsigned short ClrInstanceID,
int Values_ElementSize,
const void* Values)
{
if (!EventXplatEnabledGCBulkNode())
return ERROR_SUCCESS;
char stackBuffer[42];
char *buffer = stackBuffer;
int offset = 0;
int size = 42;
bool fixedBuffer = true;
bool success = true;
success &= WriteToBuffer(Index, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer((const BYTE *)Values, (int)Values_ElementSize * (int)Count, buffer, offset, size, fixedBuffer);
if (!success)
{
if (!fixedBuffer)
delete[] buffer;
return ERROR_WRITE_FAULT;
}
do_tracepoint(DotNETRuntime, GCBulkNode, offset, buffer);
if (!fixedBuffer)
delete[] buffer;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCBulkEdge(){ return tracepoint_enabled(DotNETRuntime, GCBulkEdge); }
extern "C" ULONG FireEtXplatGCBulkEdge(
const unsigned int Index,
const unsigned int Count,
const unsigned short ClrInstanceID,
int Values_ElementSize,
const void* Values)
{
if (!EventXplatEnabledGCBulkEdge())
return ERROR_SUCCESS;
char stackBuffer[42];
char *buffer = stackBuffer;
int offset = 0;
int size = 42;
bool fixedBuffer = true;
bool success = true;
success &= WriteToBuffer(Index, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer((const BYTE *)Values, (int)Values_ElementSize * (int)Count, buffer, offset, size, fixedBuffer);
if (!success)
{
if (!fixedBuffer)
delete[] buffer;
return ERROR_WRITE_FAULT;
}
do_tracepoint(DotNETRuntime, GCBulkEdge, offset, buffer);
if (!fixedBuffer)
delete[] buffer;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCSampledObjectAllocationHigh(){ return tracepoint_enabled(DotNETRuntime, GCSampledObjectAllocationHigh); }
extern "C" ULONG FireEtXplatGCSampledObjectAllocationHigh(
const void* Address,
const void* TypeID,
const unsigned int ObjectCountForTypeSample,
const unsigned __int64 TotalSizeForTypeSample,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledGCSampledObjectAllocationHigh())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCSampledObjectAllocationHigh,
(const size_t) Address,
(const size_t) TypeID,
ObjectCountForTypeSample,
TotalSizeForTypeSample,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCBulkSurvivingObjectRanges(){ return tracepoint_enabled(DotNETRuntime, GCBulkSurvivingObjectRanges); }
extern "C" ULONG FireEtXplatGCBulkSurvivingObjectRanges(
const unsigned int Index,
const unsigned int Count,
const unsigned short ClrInstanceID,
int Values_ElementSize,
const void* Values)
{
if (!EventXplatEnabledGCBulkSurvivingObjectRanges())
return ERROR_SUCCESS;
char stackBuffer[42];
char *buffer = stackBuffer;
int offset = 0;
int size = 42;
bool fixedBuffer = true;
bool success = true;
success &= WriteToBuffer(Index, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer((const BYTE *)Values, (int)Values_ElementSize * (int)Count, buffer, offset, size, fixedBuffer);
if (!success)
{
if (!fixedBuffer)
delete[] buffer;
return ERROR_WRITE_FAULT;
}
do_tracepoint(DotNETRuntime, GCBulkSurvivingObjectRanges, offset, buffer);
if (!fixedBuffer)
delete[] buffer;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCBulkMovedObjectRanges(){ return tracepoint_enabled(DotNETRuntime, GCBulkMovedObjectRanges); }
extern "C" ULONG FireEtXplatGCBulkMovedObjectRanges(
const unsigned int Index,
const unsigned int Count,
const unsigned short ClrInstanceID,
int Values_ElementSize,
const void* Values)
{
if (!EventXplatEnabledGCBulkMovedObjectRanges())
return ERROR_SUCCESS;
char stackBuffer[42];
char *buffer = stackBuffer;
int offset = 0;
int size = 42;
bool fixedBuffer = true;
bool success = true;
success &= WriteToBuffer(Index, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer((const BYTE *)Values, (int)Values_ElementSize * (int)Count, buffer, offset, size, fixedBuffer);
if (!success)
{
if (!fixedBuffer)
delete[] buffer;
return ERROR_WRITE_FAULT;
}
do_tracepoint(DotNETRuntime, GCBulkMovedObjectRanges, offset, buffer);
if (!fixedBuffer)
delete[] buffer;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCGenerationRange(){ return tracepoint_enabled(DotNETRuntime, GCGenerationRange); }
extern "C" ULONG FireEtXplatGCGenerationRange(
const unsigned char Generation,
const void* RangeStart,
const unsigned __int64 RangeUsedLength,
const unsigned __int64 RangeReservedLength,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledGCGenerationRange())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCGenerationRange,
Generation,
(const size_t) RangeStart,
RangeUsedLength,
RangeReservedLength,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCMarkStackRoots(){ return tracepoint_enabled(DotNETRuntime, GCMarkStackRoots); }
extern "C" ULONG FireEtXplatGCMarkStackRoots(
const unsigned int HeapNum,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledGCMarkStackRoots())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCMarkStackRoots,
HeapNum,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCMarkFinalizeQueueRoots(){ return tracepoint_enabled(DotNETRuntime, GCMarkFinalizeQueueRoots); }
extern "C" ULONG FireEtXplatGCMarkFinalizeQueueRoots(
const unsigned int HeapNum,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledGCMarkFinalizeQueueRoots())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCMarkFinalizeQueueRoots,
HeapNum,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCMarkHandles(){ return tracepoint_enabled(DotNETRuntime, GCMarkHandles); }
extern "C" ULONG FireEtXplatGCMarkHandles(
const unsigned int HeapNum,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledGCMarkHandles())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCMarkHandles,
HeapNum,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCMarkOlderGenerationRoots(){ return tracepoint_enabled(DotNETRuntime, GCMarkOlderGenerationRoots); }
extern "C" ULONG FireEtXplatGCMarkOlderGenerationRoots(
const unsigned int HeapNum,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledGCMarkOlderGenerationRoots())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCMarkOlderGenerationRoots,
HeapNum,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledFinalizeObject(){ return tracepoint_enabled(DotNETRuntime, FinalizeObject); }
extern "C" ULONG FireEtXplatFinalizeObject(
const void* TypeID,
const void* ObjectID,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledFinalizeObject())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
FinalizeObject,
(const size_t) TypeID,
(const size_t) ObjectID,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledSetGCHandle(){ return tracepoint_enabled(DotNETRuntime, SetGCHandle); }
extern "C" ULONG FireEtXplatSetGCHandle(
const void* HandleID,
const void* ObjectID,
const unsigned int Kind,
const unsigned int Generation,
const unsigned __int64 AppDomainID,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledSetGCHandle())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
SetGCHandle,
(const size_t) HandleID,
(const size_t) ObjectID,
Kind,
Generation,
AppDomainID,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledDestroyGCHandle(){ return tracepoint_enabled(DotNETRuntime, DestroyGCHandle); }
extern "C" ULONG FireEtXplatDestroyGCHandle(
const void* HandleID,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledDestroyGCHandle())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
DestroyGCHandle,
(const size_t) HandleID,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCSampledObjectAllocationLow(){ return tracepoint_enabled(DotNETRuntime, GCSampledObjectAllocationLow); }
extern "C" ULONG FireEtXplatGCSampledObjectAllocationLow(
const void* Address,
const void* TypeID,
const unsigned int ObjectCountForTypeSample,
const unsigned __int64 TotalSizeForTypeSample,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledGCSampledObjectAllocationLow())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCSampledObjectAllocationLow,
(const size_t) Address,
(const size_t) TypeID,
ObjectCountForTypeSample,
TotalSizeForTypeSample,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledPinObjectAtGCTime(){ return tracepoint_enabled(DotNETRuntime, PinObjectAtGCTime); }
extern "C" ULONG FireEtXplatPinObjectAtGCTime(
const void* HandleID,
const void* ObjectID,
const unsigned __int64 ObjectSize,
PCWSTR TypeName,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledPinObjectAtGCTime())
return ERROR_SUCCESS;
INT TypeName_path_size = -1;
PathCharString TypeName_PS;
INT TypeName_full_name_path_size = (PAL_wcslen(TypeName) + 1)*sizeof(WCHAR);
CHAR* TypeName_full_name = TypeName_PS.OpenStringBuffer(TypeName_full_name_path_size );
if (TypeName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
TypeName_path_size = WideCharToMultiByte( CP_ACP, 0, TypeName, -1, TypeName_full_name, TypeName_full_name_path_size, NULL, NULL );
_ASSERTE(TypeName_path_size < TypeName_full_name_path_size );
TypeName_PS.CloseBuffer(TypeName_path_size );
if( TypeName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
PinObjectAtGCTime,
(const size_t) HandleID,
(const size_t) ObjectID,
ObjectSize,
TypeName_full_name,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCTriggered(){ return tracepoint_enabled(DotNETRuntime, GCTriggered); }
extern "C" ULONG FireEtXplatGCTriggered(
const unsigned int Reason,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledGCTriggered())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCTriggered,
Reason,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCBulkRootCCW(){ return tracepoint_enabled(DotNETRuntime, GCBulkRootCCW); }
extern "C" ULONG FireEtXplatGCBulkRootCCW(
const unsigned int Count,
const unsigned short ClrInstanceID,
int Values_ElementSize,
const void* Values)
{
if (!EventXplatEnabledGCBulkRootCCW())
return ERROR_SUCCESS;
char stackBuffer[38];
char *buffer = stackBuffer;
int offset = 0;
int size = 38;
bool fixedBuffer = true;
bool success = true;
success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer((const BYTE *)Values, (int)Values_ElementSize * (int)Count, buffer, offset, size, fixedBuffer);
if (!success)
{
if (!fixedBuffer)
delete[] buffer;
return ERROR_WRITE_FAULT;
}
do_tracepoint(DotNETRuntime, GCBulkRootCCW, offset, buffer);
if (!fixedBuffer)
delete[] buffer;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCBulkRCW(){ return tracepoint_enabled(DotNETRuntime, GCBulkRCW); }
extern "C" ULONG FireEtXplatGCBulkRCW(
const unsigned int Count,
const unsigned short ClrInstanceID,
int Values_ElementSize,
const void* Values)
{
if (!EventXplatEnabledGCBulkRCW())
return ERROR_SUCCESS;
char stackBuffer[38];
char *buffer = stackBuffer;
int offset = 0;
int size = 38;
bool fixedBuffer = true;
bool success = true;
success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer((const BYTE *)Values, (int)Values_ElementSize * (int)Count, buffer, offset, size, fixedBuffer);
if (!success)
{
if (!fixedBuffer)
delete[] buffer;
return ERROR_WRITE_FAULT;
}
do_tracepoint(DotNETRuntime, GCBulkRCW, offset, buffer);
if (!fixedBuffer)
delete[] buffer;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCBulkRootStaticVar(){ return tracepoint_enabled(DotNETRuntime, GCBulkRootStaticVar); }
extern "C" ULONG FireEtXplatGCBulkRootStaticVar(
const unsigned int Count,
const unsigned __int64 AppDomainID,
const unsigned short ClrInstanceID,
int Values_ElementSize,
const void* Values)
{
if (!EventXplatEnabledGCBulkRootStaticVar())
return ERROR_SUCCESS;
char stackBuffer[46];
char *buffer = stackBuffer;
int offset = 0;
int size = 46;
bool fixedBuffer = true;
bool success = true;
success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(AppDomainID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer((const BYTE *)Values, (int)Values_ElementSize * (int)Count, buffer, offset, size, fixedBuffer);
if (!success)
{
if (!fixedBuffer)
delete[] buffer;
return ERROR_WRITE_FAULT;
}
do_tracepoint(DotNETRuntime, GCBulkRootStaticVar, offset, buffer);
if (!fixedBuffer)
delete[] buffer;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledWorkerThreadCreate(){ return tracepoint_enabled(DotNETRuntime, WorkerThreadCreate); }
extern "C" ULONG FireEtXplatWorkerThreadCreate(
const unsigned int WorkerThreadCount,
const unsigned int RetiredWorkerThreads)
{
if (!EventXplatEnabledWorkerThreadCreate())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
WorkerThreadCreate,
WorkerThreadCount,
RetiredWorkerThreads);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledWorkerThreadTerminate(){ return tracepoint_enabled(DotNETRuntime, WorkerThreadTerminate); }
extern "C" ULONG FireEtXplatWorkerThreadTerminate(
const unsigned int WorkerThreadCount,
const unsigned int RetiredWorkerThreads)
{
if (!EventXplatEnabledWorkerThreadTerminate())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
WorkerThreadTerminate,
WorkerThreadCount,
RetiredWorkerThreads);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledWorkerThreadRetire(){ return tracepoint_enabled(DotNETRuntime, WorkerThreadRetire); }
extern "C" ULONG FireEtXplatWorkerThreadRetire(
const unsigned int WorkerThreadCount,
const unsigned int RetiredWorkerThreads)
{
if (!EventXplatEnabledWorkerThreadRetire())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
WorkerThreadRetire,
WorkerThreadCount,
RetiredWorkerThreads);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledWorkerThreadUnretire(){ return tracepoint_enabled(DotNETRuntime, WorkerThreadUnretire); }
extern "C" ULONG FireEtXplatWorkerThreadUnretire(
const unsigned int WorkerThreadCount,
const unsigned int RetiredWorkerThreads)
{
if (!EventXplatEnabledWorkerThreadUnretire())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
WorkerThreadUnretire,
WorkerThreadCount,
RetiredWorkerThreads);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledIOThreadCreate(){ return tracepoint_enabled(DotNETRuntime, IOThreadCreate); }
extern "C" ULONG FireEtXplatIOThreadCreate(
const unsigned int IOThreadCount,
const unsigned int RetiredIOThreads)
{
if (!EventXplatEnabledIOThreadCreate())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
IOThreadCreate,
IOThreadCount,
RetiredIOThreads);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledIOThreadCreate_V1(){ return tracepoint_enabled(DotNETRuntime, IOThreadCreate_V1); }
extern "C" ULONG FireEtXplatIOThreadCreate_V1(
const unsigned int IOThreadCount,
const unsigned int RetiredIOThreads,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledIOThreadCreate_V1())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
IOThreadCreate_V1,
IOThreadCount,
RetiredIOThreads,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledIOThreadTerminate(){ return tracepoint_enabled(DotNETRuntime, IOThreadTerminate); }
extern "C" ULONG FireEtXplatIOThreadTerminate(
const unsigned int IOThreadCount,
const unsigned int RetiredIOThreads)
{
if (!EventXplatEnabledIOThreadTerminate())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
IOThreadTerminate,
IOThreadCount,
RetiredIOThreads);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledIOThreadTerminate_V1(){ return tracepoint_enabled(DotNETRuntime, IOThreadTerminate_V1); }
extern "C" ULONG FireEtXplatIOThreadTerminate_V1(
const unsigned int IOThreadCount,
const unsigned int RetiredIOThreads,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledIOThreadTerminate_V1())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
IOThreadTerminate_V1,
IOThreadCount,
RetiredIOThreads,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledIOThreadRetire(){ return tracepoint_enabled(DotNETRuntime, IOThreadRetire); }
extern "C" ULONG FireEtXplatIOThreadRetire(
const unsigned int IOThreadCount,
const unsigned int RetiredIOThreads)
{
if (!EventXplatEnabledIOThreadRetire())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
IOThreadRetire,
IOThreadCount,
RetiredIOThreads);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledIOThreadRetire_V1(){ return tracepoint_enabled(DotNETRuntime, IOThreadRetire_V1); }
extern "C" ULONG FireEtXplatIOThreadRetire_V1(
const unsigned int IOThreadCount,
const unsigned int RetiredIOThreads,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledIOThreadRetire_V1())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
IOThreadRetire_V1,
IOThreadCount,
RetiredIOThreads,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledIOThreadUnretire(){ return tracepoint_enabled(DotNETRuntime, IOThreadUnretire); }
extern "C" ULONG FireEtXplatIOThreadUnretire(
const unsigned int IOThreadCount,
const unsigned int RetiredIOThreads)
{
if (!EventXplatEnabledIOThreadUnretire())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
IOThreadUnretire,
IOThreadCount,
RetiredIOThreads);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledIOThreadUnretire_V1(){ return tracepoint_enabled(DotNETRuntime, IOThreadUnretire_V1); }
extern "C" ULONG FireEtXplatIOThreadUnretire_V1(
const unsigned int IOThreadCount,
const unsigned int RetiredIOThreads,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledIOThreadUnretire_V1())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
IOThreadUnretire_V1,
IOThreadCount,
RetiredIOThreads,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledThreadpoolSuspensionSuspendThread(){ return tracepoint_enabled(DotNETRuntime, ThreadpoolSuspensionSuspendThread); }
extern "C" ULONG FireEtXplatThreadpoolSuspensionSuspendThread(
const unsigned int ClrThreadID,
const unsigned int CpuUtilization)
{
if (!EventXplatEnabledThreadpoolSuspensionSuspendThread())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
ThreadpoolSuspensionSuspendThread,
ClrThreadID,
CpuUtilization);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledThreadpoolSuspensionResumeThread(){ return tracepoint_enabled(DotNETRuntime, ThreadpoolSuspensionResumeThread); }
extern "C" ULONG FireEtXplatThreadpoolSuspensionResumeThread(
const unsigned int ClrThreadID,
const unsigned int CpuUtilization)
{
if (!EventXplatEnabledThreadpoolSuspensionResumeThread())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
ThreadpoolSuspensionResumeThread,
ClrThreadID,
CpuUtilization);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledThreadPoolWorkerThreadStart(){ return tracepoint_enabled(DotNETRuntime, ThreadPoolWorkerThreadStart); }
extern "C" ULONG FireEtXplatThreadPoolWorkerThreadStart(
const unsigned int ActiveWorkerThreadCount,
const unsigned int RetiredWorkerThreadCount,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledThreadPoolWorkerThreadStart())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
ThreadPoolWorkerThreadStart,
ActiveWorkerThreadCount,
RetiredWorkerThreadCount,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledThreadPoolWorkerThreadStop(){ return tracepoint_enabled(DotNETRuntime, ThreadPoolWorkerThreadStop); }
extern "C" ULONG FireEtXplatThreadPoolWorkerThreadStop(
const unsigned int ActiveWorkerThreadCount,
const unsigned int RetiredWorkerThreadCount,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledThreadPoolWorkerThreadStop())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
ThreadPoolWorkerThreadStop,
ActiveWorkerThreadCount,
RetiredWorkerThreadCount,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledThreadPoolWorkerThreadRetirementStart(){ return tracepoint_enabled(DotNETRuntime, ThreadPoolWorkerThreadRetirementStart); }
extern "C" ULONG FireEtXplatThreadPoolWorkerThreadRetirementStart(
const unsigned int ActiveWorkerThreadCount,
const unsigned int RetiredWorkerThreadCount,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledThreadPoolWorkerThreadRetirementStart())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
ThreadPoolWorkerThreadRetirementStart,
ActiveWorkerThreadCount,
RetiredWorkerThreadCount,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledThreadPoolWorkerThreadRetirementStop(){ return tracepoint_enabled(DotNETRuntime, ThreadPoolWorkerThreadRetirementStop); }
extern "C" ULONG FireEtXplatThreadPoolWorkerThreadRetirementStop(
const unsigned int ActiveWorkerThreadCount,
const unsigned int RetiredWorkerThreadCount,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledThreadPoolWorkerThreadRetirementStop())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
ThreadPoolWorkerThreadRetirementStop,
ActiveWorkerThreadCount,
RetiredWorkerThreadCount,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledThreadPoolWorkerThreadAdjustmentSample(){ return tracepoint_enabled(DotNETRuntime, ThreadPoolWorkerThreadAdjustmentSample); }
extern "C" ULONG FireEtXplatThreadPoolWorkerThreadAdjustmentSample(
const double Throughput,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledThreadPoolWorkerThreadAdjustmentSample())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
ThreadPoolWorkerThreadAdjustmentSample,
Throughput,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledThreadPoolWorkerThreadAdjustmentAdjustment(){ return tracepoint_enabled(DotNETRuntime, ThreadPoolWorkerThreadAdjustmentAdjustment); }
extern "C" ULONG FireEtXplatThreadPoolWorkerThreadAdjustmentAdjustment(
const double AverageThroughput,
const unsigned int NewWorkerThreadCount,
const unsigned int Reason,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledThreadPoolWorkerThreadAdjustmentAdjustment())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
ThreadPoolWorkerThreadAdjustmentAdjustment,
AverageThroughput,
NewWorkerThreadCount,
Reason,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledThreadPoolWorkerThreadAdjustmentStats(){ return tracepoint_enabled(DotNETRuntime, ThreadPoolWorkerThreadAdjustmentStats); }
extern "C" ULONG FireEtXplatThreadPoolWorkerThreadAdjustmentStats(
const double Duration,
const double Throughput,
const double ThreadWave,
const double ThroughputWave,
const double ThroughputErrorEstimate,
const double AverageThroughputErrorEstimate,
const double ThroughputRatio,
const double Confidence,
const double NewControlSetting,
const unsigned short NewThreadWaveMagnitude,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledThreadPoolWorkerThreadAdjustmentStats())
return ERROR_SUCCESS;
char stackBuffer[76];
char *buffer = stackBuffer;
int offset = 0;
int size = 76;
bool fixedBuffer = true;
bool success = true;
success &= WriteToBuffer(Duration, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(Throughput, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ThreadWave, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ThroughputWave, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ThroughputErrorEstimate, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(AverageThroughputErrorEstimate, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ThroughputRatio, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(Confidence, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(NewControlSetting, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(NewThreadWaveMagnitude, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer);
if (!success)
{
if (!fixedBuffer)
delete[] buffer;
return ERROR_WRITE_FAULT;
}
do_tracepoint(DotNETRuntime, ThreadPoolWorkerThreadAdjustmentStats, offset, buffer);
if (!fixedBuffer)
delete[] buffer;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledThreadPoolWorkerThreadWait(){ return tracepoint_enabled(DotNETRuntime, ThreadPoolWorkerThreadWait); }
extern "C" ULONG FireEtXplatThreadPoolWorkerThreadWait(
const unsigned int ActiveWorkerThreadCount,
const unsigned int RetiredWorkerThreadCount,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledThreadPoolWorkerThreadWait())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
ThreadPoolWorkerThreadWait,
ActiveWorkerThreadCount,
RetiredWorkerThreadCount,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledThreadPoolWorkingThreadCount(){ return tracepoint_enabled(DotNETRuntime, ThreadPoolWorkingThreadCount); }
extern "C" ULONG FireEtXplatThreadPoolWorkingThreadCount(
const unsigned int Count,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledThreadPoolWorkingThreadCount())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
ThreadPoolWorkingThreadCount,
Count,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledThreadPoolEnqueue(){ return tracepoint_enabled(DotNETRuntime, ThreadPoolEnqueue); }
extern "C" ULONG FireEtXplatThreadPoolEnqueue(
const void* WorkID,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledThreadPoolEnqueue())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
ThreadPoolEnqueue,
(const size_t) WorkID,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledThreadPoolDequeue(){ return tracepoint_enabled(DotNETRuntime, ThreadPoolDequeue); }
extern "C" ULONG FireEtXplatThreadPoolDequeue(
const void* WorkID,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledThreadPoolDequeue())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
ThreadPoolDequeue,
(const size_t) WorkID,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledThreadPoolIOEnqueue(){ return tracepoint_enabled(DotNETRuntime, ThreadPoolIOEnqueue); }
extern "C" ULONG FireEtXplatThreadPoolIOEnqueue(
const void* NativeOverlapped,
const void* Overlapped,
const BOOL MultiDequeues,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledThreadPoolIOEnqueue())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
ThreadPoolIOEnqueue,
(const size_t) NativeOverlapped,
(const size_t) Overlapped,
MultiDequeues,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledThreadPoolIODequeue(){ return tracepoint_enabled(DotNETRuntime, ThreadPoolIODequeue); }
extern "C" ULONG FireEtXplatThreadPoolIODequeue(
const void* NativeOverlapped,
const void* Overlapped,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledThreadPoolIODequeue())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
ThreadPoolIODequeue,
(const size_t) NativeOverlapped,
(const size_t) Overlapped,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledThreadPoolIOPack(){ return tracepoint_enabled(DotNETRuntime, ThreadPoolIOPack); }
extern "C" ULONG FireEtXplatThreadPoolIOPack(
const void* NativeOverlapped,
const void* Overlapped,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledThreadPoolIOPack())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
ThreadPoolIOPack,
(const size_t) NativeOverlapped,
(const size_t) Overlapped,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledThreadCreating(){ return tracepoint_enabled(DotNETRuntime, ThreadCreating); }
extern "C" ULONG FireEtXplatThreadCreating(
const void* ID,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledThreadCreating())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
ThreadCreating,
(const size_t) ID,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledThreadRunning(){ return tracepoint_enabled(DotNETRuntime, ThreadRunning); }
extern "C" ULONG FireEtXplatThreadRunning(
const void* ID,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledThreadRunning())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
ThreadRunning,
(const size_t) ID,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledExceptionThrown(){ return tracepoint_enabled(DotNETRuntime, ExceptionThrown); }
extern "C" ULONG FireEtXplatExceptionThrown(
)
{
if (!EventXplatEnabledExceptionThrown())
return ERROR_SUCCESS;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledExceptionThrown_V1(){ return tracepoint_enabled(DotNETRuntime, ExceptionThrown_V1); }
extern "C" ULONG FireEtXplatExceptionThrown_V1(
PCWSTR ExceptionType,
PCWSTR ExceptionMessage,
const void* ExceptionEIP,
const unsigned int ExceptionHRESULT,
const unsigned short ExceptionFlags,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledExceptionThrown_V1())
return ERROR_SUCCESS;
INT ExceptionType_path_size = -1;
PathCharString ExceptionType_PS;
INT ExceptionType_full_name_path_size = (PAL_wcslen(ExceptionType) + 1)*sizeof(WCHAR);
CHAR* ExceptionType_full_name = ExceptionType_PS.OpenStringBuffer(ExceptionType_full_name_path_size );
if (ExceptionType_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT ExceptionMessage_path_size = -1;
PathCharString ExceptionMessage_PS;
INT ExceptionMessage_full_name_path_size = (PAL_wcslen(ExceptionMessage) + 1)*sizeof(WCHAR);
CHAR* ExceptionMessage_full_name = ExceptionMessage_PS.OpenStringBuffer(ExceptionMessage_full_name_path_size );
if (ExceptionMessage_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ExceptionType_path_size = WideCharToMultiByte( CP_ACP, 0, ExceptionType, -1, ExceptionType_full_name, ExceptionType_full_name_path_size, NULL, NULL );
_ASSERTE(ExceptionType_path_size < ExceptionType_full_name_path_size );
ExceptionType_PS.CloseBuffer(ExceptionType_path_size );
if( ExceptionType_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
ExceptionMessage_path_size = WideCharToMultiByte( CP_ACP, 0, ExceptionMessage, -1, ExceptionMessage_full_name, ExceptionMessage_full_name_path_size, NULL, NULL );
_ASSERTE(ExceptionMessage_path_size < ExceptionMessage_full_name_path_size );
ExceptionMessage_PS.CloseBuffer(ExceptionMessage_path_size );
if( ExceptionMessage_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
ExceptionThrown_V1,
ExceptionType_full_name,
ExceptionMessage_full_name,
(const size_t) ExceptionEIP,
ExceptionHRESULT,
ExceptionFlags,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledExceptionCatchStart(){ return tracepoint_enabled(DotNETRuntime, ExceptionCatchStart); }
extern "C" ULONG FireEtXplatExceptionCatchStart(
const unsigned __int64 EntryEIP,
const unsigned __int64 MethodID,
PCWSTR MethodName,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledExceptionCatchStart())
return ERROR_SUCCESS;
INT MethodName_path_size = -1;
PathCharString MethodName_PS;
INT MethodName_full_name_path_size = (PAL_wcslen(MethodName) + 1)*sizeof(WCHAR);
CHAR* MethodName_full_name = MethodName_PS.OpenStringBuffer(MethodName_full_name_path_size );
if (MethodName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
MethodName_path_size = WideCharToMultiByte( CP_ACP, 0, MethodName, -1, MethodName_full_name, MethodName_full_name_path_size, NULL, NULL );
_ASSERTE(MethodName_path_size < MethodName_full_name_path_size );
MethodName_PS.CloseBuffer(MethodName_path_size );
if( MethodName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
ExceptionCatchStart,
EntryEIP,
MethodID,
MethodName_full_name,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledExceptionCatchStop(){ return tracepoint_enabled(DotNETRuntime, ExceptionCatchStop); }
extern "C" ULONG FireEtXplatExceptionCatchStop(
)
{
if (!EventXplatEnabledExceptionCatchStop())
return ERROR_SUCCESS;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledExceptionFinallyStart(){ return tracepoint_enabled(DotNETRuntime, ExceptionFinallyStart); }
extern "C" ULONG FireEtXplatExceptionFinallyStart(
const unsigned __int64 EntryEIP,
const unsigned __int64 MethodID,
PCWSTR MethodName,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledExceptionFinallyStart())
return ERROR_SUCCESS;
INT MethodName_path_size = -1;
PathCharString MethodName_PS;
INT MethodName_full_name_path_size = (PAL_wcslen(MethodName) + 1)*sizeof(WCHAR);
CHAR* MethodName_full_name = MethodName_PS.OpenStringBuffer(MethodName_full_name_path_size );
if (MethodName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
MethodName_path_size = WideCharToMultiByte( CP_ACP, 0, MethodName, -1, MethodName_full_name, MethodName_full_name_path_size, NULL, NULL );
_ASSERTE(MethodName_path_size < MethodName_full_name_path_size );
MethodName_PS.CloseBuffer(MethodName_path_size );
if( MethodName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
ExceptionFinallyStart,
EntryEIP,
MethodID,
MethodName_full_name,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledExceptionFinallyStop(){ return tracepoint_enabled(DotNETRuntime, ExceptionFinallyStop); }
extern "C" ULONG FireEtXplatExceptionFinallyStop(
)
{
if (!EventXplatEnabledExceptionFinallyStop())
return ERROR_SUCCESS;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledExceptionFilterStart(){ return tracepoint_enabled(DotNETRuntime, ExceptionFilterStart); }
extern "C" ULONG FireEtXplatExceptionFilterStart(
const unsigned __int64 EntryEIP,
const unsigned __int64 MethodID,
PCWSTR MethodName,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledExceptionFilterStart())
return ERROR_SUCCESS;
INT MethodName_path_size = -1;
PathCharString MethodName_PS;
INT MethodName_full_name_path_size = (PAL_wcslen(MethodName) + 1)*sizeof(WCHAR);
CHAR* MethodName_full_name = MethodName_PS.OpenStringBuffer(MethodName_full_name_path_size );
if (MethodName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
MethodName_path_size = WideCharToMultiByte( CP_ACP, 0, MethodName, -1, MethodName_full_name, MethodName_full_name_path_size, NULL, NULL );
_ASSERTE(MethodName_path_size < MethodName_full_name_path_size );
MethodName_PS.CloseBuffer(MethodName_path_size );
if( MethodName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
ExceptionFilterStart,
EntryEIP,
MethodID,
MethodName_full_name,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledExceptionFilterStop(){ return tracepoint_enabled(DotNETRuntime, ExceptionFilterStop); }
extern "C" ULONG FireEtXplatExceptionFilterStop(
)
{
if (!EventXplatEnabledExceptionFilterStop())
return ERROR_SUCCESS;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledExceptionThrownStop(){ return tracepoint_enabled(DotNETRuntime, ExceptionThrownStop); }
extern "C" ULONG FireEtXplatExceptionThrownStop(
)
{
if (!EventXplatEnabledExceptionThrownStop())
return ERROR_SUCCESS;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledContention(){ return tracepoint_enabled(DotNETRuntime, Contention); }
extern "C" ULONG FireEtXplatContention(
)
{
if (!EventXplatEnabledContention())
return ERROR_SUCCESS;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledContentionStart_V1(){ return tracepoint_enabled(DotNETRuntime, ContentionStart_V1); }
extern "C" ULONG FireEtXplatContentionStart_V1(
const unsigned char ContentionFlags,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledContentionStart_V1())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
ContentionStart_V1,
ContentionFlags,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledContentionStop(){ return tracepoint_enabled(DotNETRuntime, ContentionStop); }
extern "C" ULONG FireEtXplatContentionStop(
const unsigned char ContentionFlags,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledContentionStop())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
ContentionStop,
ContentionFlags,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledCLRStackWalk(){ return tracepoint_enabled(DotNETRuntime, CLRStackWalk); }
extern "C" ULONG FireEtXplatCLRStackWalk(
const unsigned short ClrInstanceID,
const unsigned char Reserved1,
const unsigned char Reserved2,
const unsigned int FrameCount,
const void** Stack)
{
if (!EventXplatEnabledCLRStackWalk())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
CLRStackWalk,
ClrInstanceID,
Reserved1,
Reserved2,
FrameCount,
(const size_t*) Stack);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledAppDomainMemAllocated(){ return tracepoint_enabled(DotNETRuntime, AppDomainMemAllocated); }
extern "C" ULONG FireEtXplatAppDomainMemAllocated(
const unsigned __int64 AppDomainID,
const unsigned __int64 Allocated,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledAppDomainMemAllocated())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
AppDomainMemAllocated,
AppDomainID,
Allocated,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledAppDomainMemSurvived(){ return tracepoint_enabled(DotNETRuntime, AppDomainMemSurvived); }
extern "C" ULONG FireEtXplatAppDomainMemSurvived(
const unsigned __int64 AppDomainID,
const unsigned __int64 Survived,
const unsigned __int64 ProcessSurvived,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledAppDomainMemSurvived())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
AppDomainMemSurvived,
AppDomainID,
Survived,
ProcessSurvived,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledThreadCreated(){ return tracepoint_enabled(DotNETRuntime, ThreadCreated); }
extern "C" ULONG FireEtXplatThreadCreated(
const unsigned __int64 ManagedThreadID,
const unsigned __int64 AppDomainID,
const unsigned int Flags,
const unsigned int ManagedThreadIndex,
const unsigned int OSThreadID,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledThreadCreated())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
ThreadCreated,
ManagedThreadID,
AppDomainID,
Flags,
ManagedThreadIndex,
OSThreadID,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledThreadTerminated(){ return tracepoint_enabled(DotNETRuntime, ThreadTerminated); }
extern "C" ULONG FireEtXplatThreadTerminated(
const unsigned __int64 ManagedThreadID,
const unsigned __int64 AppDomainID,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledThreadTerminated())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
ThreadTerminated,
ManagedThreadID,
AppDomainID,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledThreadDomainEnter(){ return tracepoint_enabled(DotNETRuntime, ThreadDomainEnter); }
extern "C" ULONG FireEtXplatThreadDomainEnter(
const unsigned __int64 ManagedThreadID,
const unsigned __int64 AppDomainID,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledThreadDomainEnter())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
ThreadDomainEnter,
ManagedThreadID,
AppDomainID,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledILStubGenerated(){ return tracepoint_enabled(DotNETRuntime, ILStubGenerated); }
extern "C" ULONG FireEtXplatILStubGenerated(
const unsigned short ClrInstanceID,
const unsigned __int64 ModuleID,
const unsigned __int64 StubMethodID,
const unsigned int StubFlags,
const unsigned int ManagedInteropMethodToken,
PCWSTR ManagedInteropMethodNamespace,
PCWSTR ManagedInteropMethodName,
PCWSTR ManagedInteropMethodSignature,
PCWSTR NativeMethodSignature,
PCWSTR StubMethodSignature,
PCWSTR StubMethodILCode)
{
if (!EventXplatEnabledILStubGenerated())
return ERROR_SUCCESS;
char stackBuffer[410];
char *buffer = stackBuffer;
int offset = 0;
int size = 410;
bool fixedBuffer = true;
bool success = true;
success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ModuleID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(StubMethodID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(StubFlags, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ManagedInteropMethodToken, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ManagedInteropMethodNamespace, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ManagedInteropMethodName, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ManagedInteropMethodSignature, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(NativeMethodSignature, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(StubMethodSignature, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(StubMethodILCode, buffer, offset, size, fixedBuffer);
if (!success)
{
if (!fixedBuffer)
delete[] buffer;
return ERROR_WRITE_FAULT;
}
do_tracepoint(DotNETRuntime, ILStubGenerated, offset, buffer);
if (!fixedBuffer)
delete[] buffer;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledILStubCacheHit(){ return tracepoint_enabled(DotNETRuntime, ILStubCacheHit); }
extern "C" ULONG FireEtXplatILStubCacheHit(
const unsigned short ClrInstanceID,
const unsigned __int64 ModuleID,
const unsigned __int64 StubMethodID,
const unsigned int ManagedInteropMethodToken,
PCWSTR ManagedInteropMethodNamespace,
PCWSTR ManagedInteropMethodName,
PCWSTR ManagedInteropMethodSignature)
{
if (!EventXplatEnabledILStubCacheHit())
return ERROR_SUCCESS;
INT ManagedInteropMethodNamespace_path_size = -1;
PathCharString ManagedInteropMethodNamespace_PS;
INT ManagedInteropMethodNamespace_full_name_path_size = (PAL_wcslen(ManagedInteropMethodNamespace) + 1)*sizeof(WCHAR);
CHAR* ManagedInteropMethodNamespace_full_name = ManagedInteropMethodNamespace_PS.OpenStringBuffer(ManagedInteropMethodNamespace_full_name_path_size );
if (ManagedInteropMethodNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT ManagedInteropMethodName_path_size = -1;
PathCharString ManagedInteropMethodName_PS;
INT ManagedInteropMethodName_full_name_path_size = (PAL_wcslen(ManagedInteropMethodName) + 1)*sizeof(WCHAR);
CHAR* ManagedInteropMethodName_full_name = ManagedInteropMethodName_PS.OpenStringBuffer(ManagedInteropMethodName_full_name_path_size );
if (ManagedInteropMethodName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT ManagedInteropMethodSignature_path_size = -1;
PathCharString ManagedInteropMethodSignature_PS;
INT ManagedInteropMethodSignature_full_name_path_size = (PAL_wcslen(ManagedInteropMethodSignature) + 1)*sizeof(WCHAR);
CHAR* ManagedInteropMethodSignature_full_name = ManagedInteropMethodSignature_PS.OpenStringBuffer(ManagedInteropMethodSignature_full_name_path_size );
if (ManagedInteropMethodSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ManagedInteropMethodNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, ManagedInteropMethodNamespace, -1, ManagedInteropMethodNamespace_full_name, ManagedInteropMethodNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(ManagedInteropMethodNamespace_path_size < ManagedInteropMethodNamespace_full_name_path_size );
ManagedInteropMethodNamespace_PS.CloseBuffer(ManagedInteropMethodNamespace_path_size );
if( ManagedInteropMethodNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
ManagedInteropMethodName_path_size = WideCharToMultiByte( CP_ACP, 0, ManagedInteropMethodName, -1, ManagedInteropMethodName_full_name, ManagedInteropMethodName_full_name_path_size, NULL, NULL );
_ASSERTE(ManagedInteropMethodName_path_size < ManagedInteropMethodName_full_name_path_size );
ManagedInteropMethodName_PS.CloseBuffer(ManagedInteropMethodName_path_size );
if( ManagedInteropMethodName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
ManagedInteropMethodSignature_path_size = WideCharToMultiByte( CP_ACP, 0, ManagedInteropMethodSignature, -1, ManagedInteropMethodSignature_full_name, ManagedInteropMethodSignature_full_name_path_size, NULL, NULL );
_ASSERTE(ManagedInteropMethodSignature_path_size < ManagedInteropMethodSignature_full_name_path_size );
ManagedInteropMethodSignature_PS.CloseBuffer(ManagedInteropMethodSignature_path_size );
if( ManagedInteropMethodSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
ILStubCacheHit,
ClrInstanceID,
ModuleID,
StubMethodID,
ManagedInteropMethodToken,
ManagedInteropMethodNamespace_full_name,
ManagedInteropMethodName_full_name,
ManagedInteropMethodSignature_full_name);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledDCStartCompleteV2(){ return tracepoint_enabled(DotNETRuntime, DCStartCompleteV2); }
extern "C" ULONG FireEtXplatDCStartCompleteV2(
)
{
if (!EventXplatEnabledDCStartCompleteV2())
return ERROR_SUCCESS;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledDCEndCompleteV2(){ return tracepoint_enabled(DotNETRuntime, DCEndCompleteV2); }
extern "C" ULONG FireEtXplatDCEndCompleteV2(
)
{
if (!EventXplatEnabledDCEndCompleteV2())
return ERROR_SUCCESS;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledMethodDCStartV2(){ return tracepoint_enabled(DotNETRuntime, MethodDCStartV2); }
extern "C" ULONG FireEtXplatMethodDCStartV2(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags)
{
if (!EventXplatEnabledMethodDCStartV2())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
MethodDCStartV2,
MethodID,
ModuleID,
MethodStartAddress,
MethodSize,
MethodToken,
MethodFlags);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledMethodDCEndV2(){ return tracepoint_enabled(DotNETRuntime, MethodDCEndV2); }
extern "C" ULONG FireEtXplatMethodDCEndV2(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags)
{
if (!EventXplatEnabledMethodDCEndV2())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
MethodDCEndV2,
MethodID,
ModuleID,
MethodStartAddress,
MethodSize,
MethodToken,
MethodFlags);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledMethodDCStartVerboseV2(){ return tracepoint_enabled(DotNETRuntime, MethodDCStartVerboseV2); }
extern "C" ULONG FireEtXplatMethodDCStartVerboseV2(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags,
PCWSTR MethodNamespace,
PCWSTR MethodName,
PCWSTR MethodSignature)
{
if (!EventXplatEnabledMethodDCStartVerboseV2())
return ERROR_SUCCESS;
INT MethodNamespace_path_size = -1;
PathCharString MethodNamespace_PS;
INT MethodNamespace_full_name_path_size = (PAL_wcslen(MethodNamespace) + 1)*sizeof(WCHAR);
CHAR* MethodNamespace_full_name = MethodNamespace_PS.OpenStringBuffer(MethodNamespace_full_name_path_size );
if (MethodNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodName_path_size = -1;
PathCharString MethodName_PS;
INT MethodName_full_name_path_size = (PAL_wcslen(MethodName) + 1)*sizeof(WCHAR);
CHAR* MethodName_full_name = MethodName_PS.OpenStringBuffer(MethodName_full_name_path_size );
if (MethodName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodSignature_path_size = -1;
PathCharString MethodSignature_PS;
INT MethodSignature_full_name_path_size = (PAL_wcslen(MethodSignature) + 1)*sizeof(WCHAR);
CHAR* MethodSignature_full_name = MethodSignature_PS.OpenStringBuffer(MethodSignature_full_name_path_size );
if (MethodSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
MethodNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, MethodNamespace, -1, MethodNamespace_full_name, MethodNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(MethodNamespace_path_size < MethodNamespace_full_name_path_size );
MethodNamespace_PS.CloseBuffer(MethodNamespace_path_size );
if( MethodNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodName_path_size = WideCharToMultiByte( CP_ACP, 0, MethodName, -1, MethodName_full_name, MethodName_full_name_path_size, NULL, NULL );
_ASSERTE(MethodName_path_size < MethodName_full_name_path_size );
MethodName_PS.CloseBuffer(MethodName_path_size );
if( MethodName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodSignature_path_size = WideCharToMultiByte( CP_ACP, 0, MethodSignature, -1, MethodSignature_full_name, MethodSignature_full_name_path_size, NULL, NULL );
_ASSERTE(MethodSignature_path_size < MethodSignature_full_name_path_size );
MethodSignature_PS.CloseBuffer(MethodSignature_path_size );
if( MethodSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
MethodDCStartVerboseV2,
MethodID,
ModuleID,
MethodStartAddress,
MethodSize,
MethodToken,
MethodFlags,
MethodNamespace_full_name,
MethodName_full_name,
MethodSignature_full_name);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledMethodDCEndVerboseV2(){ return tracepoint_enabled(DotNETRuntime, MethodDCEndVerboseV2); }
extern "C" ULONG FireEtXplatMethodDCEndVerboseV2(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags,
PCWSTR MethodNamespace,
PCWSTR MethodName,
PCWSTR MethodSignature)
{
if (!EventXplatEnabledMethodDCEndVerboseV2())
return ERROR_SUCCESS;
INT MethodNamespace_path_size = -1;
PathCharString MethodNamespace_PS;
INT MethodNamespace_full_name_path_size = (PAL_wcslen(MethodNamespace) + 1)*sizeof(WCHAR);
CHAR* MethodNamespace_full_name = MethodNamespace_PS.OpenStringBuffer(MethodNamespace_full_name_path_size );
if (MethodNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodName_path_size = -1;
PathCharString MethodName_PS;
INT MethodName_full_name_path_size = (PAL_wcslen(MethodName) + 1)*sizeof(WCHAR);
CHAR* MethodName_full_name = MethodName_PS.OpenStringBuffer(MethodName_full_name_path_size );
if (MethodName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodSignature_path_size = -1;
PathCharString MethodSignature_PS;
INT MethodSignature_full_name_path_size = (PAL_wcslen(MethodSignature) + 1)*sizeof(WCHAR);
CHAR* MethodSignature_full_name = MethodSignature_PS.OpenStringBuffer(MethodSignature_full_name_path_size );
if (MethodSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
MethodNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, MethodNamespace, -1, MethodNamespace_full_name, MethodNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(MethodNamespace_path_size < MethodNamespace_full_name_path_size );
MethodNamespace_PS.CloseBuffer(MethodNamespace_path_size );
if( MethodNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodName_path_size = WideCharToMultiByte( CP_ACP, 0, MethodName, -1, MethodName_full_name, MethodName_full_name_path_size, NULL, NULL );
_ASSERTE(MethodName_path_size < MethodName_full_name_path_size );
MethodName_PS.CloseBuffer(MethodName_path_size );
if( MethodName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodSignature_path_size = WideCharToMultiByte( CP_ACP, 0, MethodSignature, -1, MethodSignature_full_name, MethodSignature_full_name_path_size, NULL, NULL );
_ASSERTE(MethodSignature_path_size < MethodSignature_full_name_path_size );
MethodSignature_PS.CloseBuffer(MethodSignature_path_size );
if( MethodSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
MethodDCEndVerboseV2,
MethodID,
ModuleID,
MethodStartAddress,
MethodSize,
MethodToken,
MethodFlags,
MethodNamespace_full_name,
MethodName_full_name,
MethodSignature_full_name);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledMethodLoad(){ return tracepoint_enabled(DotNETRuntime, MethodLoad); }
extern "C" ULONG FireEtXplatMethodLoad(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags)
{
if (!EventXplatEnabledMethodLoad())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
MethodLoad,
MethodID,
ModuleID,
MethodStartAddress,
MethodSize,
MethodToken,
MethodFlags);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledMethodLoad_V1(){ return tracepoint_enabled(DotNETRuntime, MethodLoad_V1); }
extern "C" ULONG FireEtXplatMethodLoad_V1(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledMethodLoad_V1())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
MethodLoad_V1,
MethodID,
ModuleID,
MethodStartAddress,
MethodSize,
MethodToken,
MethodFlags,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledMethodLoad_V2(){ return tracepoint_enabled(DotNETRuntime, MethodLoad_V2); }
extern "C" ULONG FireEtXplatMethodLoad_V2(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags,
const unsigned short ClrInstanceID,
const unsigned __int64 ReJITID)
{
if (!EventXplatEnabledMethodLoad_V2())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
MethodLoad_V2,
MethodID,
ModuleID,
MethodStartAddress,
MethodSize,
MethodToken,
MethodFlags,
ClrInstanceID,
ReJITID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledMethodUnload(){ return tracepoint_enabled(DotNETRuntime, MethodUnload); }
extern "C" ULONG FireEtXplatMethodUnload(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags)
{
if (!EventXplatEnabledMethodUnload())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
MethodUnload,
MethodID,
ModuleID,
MethodStartAddress,
MethodSize,
MethodToken,
MethodFlags);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledMethodUnload_V1(){ return tracepoint_enabled(DotNETRuntime, MethodUnload_V1); }
extern "C" ULONG FireEtXplatMethodUnload_V1(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledMethodUnload_V1())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
MethodUnload_V1,
MethodID,
ModuleID,
MethodStartAddress,
MethodSize,
MethodToken,
MethodFlags,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledMethodUnload_V2(){ return tracepoint_enabled(DotNETRuntime, MethodUnload_V2); }
extern "C" ULONG FireEtXplatMethodUnload_V2(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags,
const unsigned short ClrInstanceID,
const unsigned __int64 ReJITID)
{
if (!EventXplatEnabledMethodUnload_V2())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
MethodUnload_V2,
MethodID,
ModuleID,
MethodStartAddress,
MethodSize,
MethodToken,
MethodFlags,
ClrInstanceID,
ReJITID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledMethodLoadVerbose(){ return tracepoint_enabled(DotNETRuntime, MethodLoadVerbose); }
extern "C" ULONG FireEtXplatMethodLoadVerbose(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags,
PCWSTR MethodNamespace,
PCWSTR MethodName,
PCWSTR MethodSignature)
{
if (!EventXplatEnabledMethodLoadVerbose())
return ERROR_SUCCESS;
INT MethodNamespace_path_size = -1;
PathCharString MethodNamespace_PS;
INT MethodNamespace_full_name_path_size = (PAL_wcslen(MethodNamespace) + 1)*sizeof(WCHAR);
CHAR* MethodNamespace_full_name = MethodNamespace_PS.OpenStringBuffer(MethodNamespace_full_name_path_size );
if (MethodNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodName_path_size = -1;
PathCharString MethodName_PS;
INT MethodName_full_name_path_size = (PAL_wcslen(MethodName) + 1)*sizeof(WCHAR);
CHAR* MethodName_full_name = MethodName_PS.OpenStringBuffer(MethodName_full_name_path_size );
if (MethodName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodSignature_path_size = -1;
PathCharString MethodSignature_PS;
INT MethodSignature_full_name_path_size = (PAL_wcslen(MethodSignature) + 1)*sizeof(WCHAR);
CHAR* MethodSignature_full_name = MethodSignature_PS.OpenStringBuffer(MethodSignature_full_name_path_size );
if (MethodSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
MethodNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, MethodNamespace, -1, MethodNamespace_full_name, MethodNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(MethodNamespace_path_size < MethodNamespace_full_name_path_size );
MethodNamespace_PS.CloseBuffer(MethodNamespace_path_size );
if( MethodNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodName_path_size = WideCharToMultiByte( CP_ACP, 0, MethodName, -1, MethodName_full_name, MethodName_full_name_path_size, NULL, NULL );
_ASSERTE(MethodName_path_size < MethodName_full_name_path_size );
MethodName_PS.CloseBuffer(MethodName_path_size );
if( MethodName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodSignature_path_size = WideCharToMultiByte( CP_ACP, 0, MethodSignature, -1, MethodSignature_full_name, MethodSignature_full_name_path_size, NULL, NULL );
_ASSERTE(MethodSignature_path_size < MethodSignature_full_name_path_size );
MethodSignature_PS.CloseBuffer(MethodSignature_path_size );
if( MethodSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
MethodLoadVerbose,
MethodID,
ModuleID,
MethodStartAddress,
MethodSize,
MethodToken,
MethodFlags,
MethodNamespace_full_name,
MethodName_full_name,
MethodSignature_full_name);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledMethodLoadVerbose_V1(){ return tracepoint_enabled(DotNETRuntime, MethodLoadVerbose_V1); }
extern "C" ULONG FireEtXplatMethodLoadVerbose_V1(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags,
PCWSTR MethodNamespace,
PCWSTR MethodName,
PCWSTR MethodSignature,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledMethodLoadVerbose_V1())
return ERROR_SUCCESS;
char stackBuffer[230];
char *buffer = stackBuffer;
int offset = 0;
int size = 230;
bool fixedBuffer = true;
bool success = true;
success &= WriteToBuffer(MethodID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ModuleID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodStartAddress, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodSize, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodToken, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodFlags, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodNamespace, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodName, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodSignature, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer);
if (!success)
{
if (!fixedBuffer)
delete[] buffer;
return ERROR_WRITE_FAULT;
}
do_tracepoint(DotNETRuntime, MethodLoadVerbose_V1, offset, buffer);
if (!fixedBuffer)
delete[] buffer;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledMethodLoadVerbose_V2(){ return tracepoint_enabled(DotNETRuntime, MethodLoadVerbose_V2); }
extern "C" ULONG FireEtXplatMethodLoadVerbose_V2(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags,
PCWSTR MethodNamespace,
PCWSTR MethodName,
PCWSTR MethodSignature,
const unsigned short ClrInstanceID,
const unsigned __int64 ReJITID)
{
if (!EventXplatEnabledMethodLoadVerbose_V2())
return ERROR_SUCCESS;
char stackBuffer[238];
char *buffer = stackBuffer;
int offset = 0;
int size = 238;
bool fixedBuffer = true;
bool success = true;
success &= WriteToBuffer(MethodID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ModuleID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodStartAddress, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodSize, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodToken, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodFlags, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodNamespace, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodName, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodSignature, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ReJITID, buffer, offset, size, fixedBuffer);
if (!success)
{
if (!fixedBuffer)
delete[] buffer;
return ERROR_WRITE_FAULT;
}
do_tracepoint(DotNETRuntime, MethodLoadVerbose_V2, offset, buffer);
if (!fixedBuffer)
delete[] buffer;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledMethodUnloadVerbose(){ return tracepoint_enabled(DotNETRuntime, MethodUnloadVerbose); }
extern "C" ULONG FireEtXplatMethodUnloadVerbose(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags,
PCWSTR MethodNamespace,
PCWSTR MethodName,
PCWSTR MethodSignature)
{
if (!EventXplatEnabledMethodUnloadVerbose())
return ERROR_SUCCESS;
INT MethodNamespace_path_size = -1;
PathCharString MethodNamespace_PS;
INT MethodNamespace_full_name_path_size = (PAL_wcslen(MethodNamespace) + 1)*sizeof(WCHAR);
CHAR* MethodNamespace_full_name = MethodNamespace_PS.OpenStringBuffer(MethodNamespace_full_name_path_size );
if (MethodNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodName_path_size = -1;
PathCharString MethodName_PS;
INT MethodName_full_name_path_size = (PAL_wcslen(MethodName) + 1)*sizeof(WCHAR);
CHAR* MethodName_full_name = MethodName_PS.OpenStringBuffer(MethodName_full_name_path_size );
if (MethodName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodSignature_path_size = -1;
PathCharString MethodSignature_PS;
INT MethodSignature_full_name_path_size = (PAL_wcslen(MethodSignature) + 1)*sizeof(WCHAR);
CHAR* MethodSignature_full_name = MethodSignature_PS.OpenStringBuffer(MethodSignature_full_name_path_size );
if (MethodSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
MethodNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, MethodNamespace, -1, MethodNamespace_full_name, MethodNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(MethodNamespace_path_size < MethodNamespace_full_name_path_size );
MethodNamespace_PS.CloseBuffer(MethodNamespace_path_size );
if( MethodNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodName_path_size = WideCharToMultiByte( CP_ACP, 0, MethodName, -1, MethodName_full_name, MethodName_full_name_path_size, NULL, NULL );
_ASSERTE(MethodName_path_size < MethodName_full_name_path_size );
MethodName_PS.CloseBuffer(MethodName_path_size );
if( MethodName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodSignature_path_size = WideCharToMultiByte( CP_ACP, 0, MethodSignature, -1, MethodSignature_full_name, MethodSignature_full_name_path_size, NULL, NULL );
_ASSERTE(MethodSignature_path_size < MethodSignature_full_name_path_size );
MethodSignature_PS.CloseBuffer(MethodSignature_path_size );
if( MethodSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
MethodUnloadVerbose,
MethodID,
ModuleID,
MethodStartAddress,
MethodSize,
MethodToken,
MethodFlags,
MethodNamespace_full_name,
MethodName_full_name,
MethodSignature_full_name);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledMethodUnloadVerbose_V1(){ return tracepoint_enabled(DotNETRuntime, MethodUnloadVerbose_V1); }
extern "C" ULONG FireEtXplatMethodUnloadVerbose_V1(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags,
PCWSTR MethodNamespace,
PCWSTR MethodName,
PCWSTR MethodSignature,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledMethodUnloadVerbose_V1())
return ERROR_SUCCESS;
char stackBuffer[230];
char *buffer = stackBuffer;
int offset = 0;
int size = 230;
bool fixedBuffer = true;
bool success = true;
success &= WriteToBuffer(MethodID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ModuleID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodStartAddress, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodSize, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodToken, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodFlags, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodNamespace, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodName, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodSignature, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer);
if (!success)
{
if (!fixedBuffer)
delete[] buffer;
return ERROR_WRITE_FAULT;
}
do_tracepoint(DotNETRuntime, MethodUnloadVerbose_V1, offset, buffer);
if (!fixedBuffer)
delete[] buffer;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledMethodUnloadVerbose_V2(){ return tracepoint_enabled(DotNETRuntime, MethodUnloadVerbose_V2); }
extern "C" ULONG FireEtXplatMethodUnloadVerbose_V2(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags,
PCWSTR MethodNamespace,
PCWSTR MethodName,
PCWSTR MethodSignature,
const unsigned short ClrInstanceID,
const unsigned __int64 ReJITID)
{
if (!EventXplatEnabledMethodUnloadVerbose_V2())
return ERROR_SUCCESS;
char stackBuffer[238];
char *buffer = stackBuffer;
int offset = 0;
int size = 238;
bool fixedBuffer = true;
bool success = true;
success &= WriteToBuffer(MethodID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ModuleID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodStartAddress, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodSize, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodToken, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodFlags, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodNamespace, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodName, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodSignature, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ReJITID, buffer, offset, size, fixedBuffer);
if (!success)
{
if (!fixedBuffer)
delete[] buffer;
return ERROR_WRITE_FAULT;
}
do_tracepoint(DotNETRuntime, MethodUnloadVerbose_V2, offset, buffer);
if (!fixedBuffer)
delete[] buffer;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledMethodJittingStarted(){ return tracepoint_enabled(DotNETRuntime, MethodJittingStarted); }
extern "C" ULONG FireEtXplatMethodJittingStarted(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned int MethodToken,
const unsigned int MethodILSize,
PCWSTR MethodNamespace,
PCWSTR MethodName,
PCWSTR MethodSignature)
{
if (!EventXplatEnabledMethodJittingStarted())
return ERROR_SUCCESS;
INT MethodNamespace_path_size = -1;
PathCharString MethodNamespace_PS;
INT MethodNamespace_full_name_path_size = (PAL_wcslen(MethodNamespace) + 1)*sizeof(WCHAR);
CHAR* MethodNamespace_full_name = MethodNamespace_PS.OpenStringBuffer(MethodNamespace_full_name_path_size );
if (MethodNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodName_path_size = -1;
PathCharString MethodName_PS;
INT MethodName_full_name_path_size = (PAL_wcslen(MethodName) + 1)*sizeof(WCHAR);
CHAR* MethodName_full_name = MethodName_PS.OpenStringBuffer(MethodName_full_name_path_size );
if (MethodName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodSignature_path_size = -1;
PathCharString MethodSignature_PS;
INT MethodSignature_full_name_path_size = (PAL_wcslen(MethodSignature) + 1)*sizeof(WCHAR);
CHAR* MethodSignature_full_name = MethodSignature_PS.OpenStringBuffer(MethodSignature_full_name_path_size );
if (MethodSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
MethodNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, MethodNamespace, -1, MethodNamespace_full_name, MethodNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(MethodNamespace_path_size < MethodNamespace_full_name_path_size );
MethodNamespace_PS.CloseBuffer(MethodNamespace_path_size );
if( MethodNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodName_path_size = WideCharToMultiByte( CP_ACP, 0, MethodName, -1, MethodName_full_name, MethodName_full_name_path_size, NULL, NULL );
_ASSERTE(MethodName_path_size < MethodName_full_name_path_size );
MethodName_PS.CloseBuffer(MethodName_path_size );
if( MethodName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodSignature_path_size = WideCharToMultiByte( CP_ACP, 0, MethodSignature, -1, MethodSignature_full_name, MethodSignature_full_name_path_size, NULL, NULL );
_ASSERTE(MethodSignature_path_size < MethodSignature_full_name_path_size );
MethodSignature_PS.CloseBuffer(MethodSignature_path_size );
if( MethodSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
MethodJittingStarted,
MethodID,
ModuleID,
MethodToken,
MethodILSize,
MethodNamespace_full_name,
MethodName_full_name,
MethodSignature_full_name);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledMethodJittingStarted_V1(){ return tracepoint_enabled(DotNETRuntime, MethodJittingStarted_V1); }
extern "C" ULONG FireEtXplatMethodJittingStarted_V1(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned int MethodToken,
const unsigned int MethodILSize,
PCWSTR MethodNamespace,
PCWSTR MethodName,
PCWSTR MethodSignature,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledMethodJittingStarted_V1())
return ERROR_SUCCESS;
INT MethodNamespace_path_size = -1;
PathCharString MethodNamespace_PS;
INT MethodNamespace_full_name_path_size = (PAL_wcslen(MethodNamespace) + 1)*sizeof(WCHAR);
CHAR* MethodNamespace_full_name = MethodNamespace_PS.OpenStringBuffer(MethodNamespace_full_name_path_size );
if (MethodNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodName_path_size = -1;
PathCharString MethodName_PS;
INT MethodName_full_name_path_size = (PAL_wcslen(MethodName) + 1)*sizeof(WCHAR);
CHAR* MethodName_full_name = MethodName_PS.OpenStringBuffer(MethodName_full_name_path_size );
if (MethodName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodSignature_path_size = -1;
PathCharString MethodSignature_PS;
INT MethodSignature_full_name_path_size = (PAL_wcslen(MethodSignature) + 1)*sizeof(WCHAR);
CHAR* MethodSignature_full_name = MethodSignature_PS.OpenStringBuffer(MethodSignature_full_name_path_size );
if (MethodSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
MethodNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, MethodNamespace, -1, MethodNamespace_full_name, MethodNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(MethodNamespace_path_size < MethodNamespace_full_name_path_size );
MethodNamespace_PS.CloseBuffer(MethodNamespace_path_size );
if( MethodNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodName_path_size = WideCharToMultiByte( CP_ACP, 0, MethodName, -1, MethodName_full_name, MethodName_full_name_path_size, NULL, NULL );
_ASSERTE(MethodName_path_size < MethodName_full_name_path_size );
MethodName_PS.CloseBuffer(MethodName_path_size );
if( MethodName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodSignature_path_size = WideCharToMultiByte( CP_ACP, 0, MethodSignature, -1, MethodSignature_full_name, MethodSignature_full_name_path_size, NULL, NULL );
_ASSERTE(MethodSignature_path_size < MethodSignature_full_name_path_size );
MethodSignature_PS.CloseBuffer(MethodSignature_path_size );
if( MethodSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
MethodJittingStarted_V1,
MethodID,
ModuleID,
MethodToken,
MethodILSize,
MethodNamespace_full_name,
MethodName_full_name,
MethodSignature_full_name,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledMethodJitInliningSucceeded(){ return tracepoint_enabled(DotNETRuntime, MethodJitInliningSucceeded); }
extern "C" ULONG FireEtXplatMethodJitInliningSucceeded(
PCWSTR MethodBeingCompiledNamespace,
PCWSTR MethodBeingCompiledName,
PCWSTR MethodBeingCompiledNameSignature,
PCWSTR InlinerNamespace,
PCWSTR InlinerName,
PCWSTR InlinerNameSignature,
PCWSTR InlineeNamespace,
PCWSTR InlineeName,
PCWSTR InlineeNameSignature,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledMethodJitInliningSucceeded())
return ERROR_SUCCESS;
char stackBuffer[578];
char *buffer = stackBuffer;
int offset = 0;
int size = 578;
bool fixedBuffer = true;
bool success = true;
success &= WriteToBuffer(MethodBeingCompiledNamespace, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodBeingCompiledName, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodBeingCompiledNameSignature, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(InlinerNamespace, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(InlinerName, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(InlinerNameSignature, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(InlineeNamespace, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(InlineeName, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(InlineeNameSignature, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer);
if (!success)
{
if (!fixedBuffer)
delete[] buffer;
return ERROR_WRITE_FAULT;
}
do_tracepoint(DotNETRuntime, MethodJitInliningSucceeded, offset, buffer);
if (!fixedBuffer)
delete[] buffer;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledMethodJitInliningFailed(){ return tracepoint_enabled(DotNETRuntime, MethodJitInliningFailed); }
extern "C" ULONG FireEtXplatMethodJitInliningFailed(
PCWSTR MethodBeingCompiledNamespace,
PCWSTR MethodBeingCompiledName,
PCWSTR MethodBeingCompiledNameSignature,
PCWSTR InlinerNamespace,
PCWSTR InlinerName,
PCWSTR InlinerNameSignature,
PCWSTR InlineeNamespace,
PCWSTR InlineeName,
PCWSTR InlineeNameSignature,
const BOOL FailAlways,
LPCSTR FailReason,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledMethodJitInliningFailed())
return ERROR_SUCCESS;
char stackBuffer[614];
char *buffer = stackBuffer;
int offset = 0;
int size = 614;
bool fixedBuffer = true;
bool success = true;
success &= WriteToBuffer(MethodBeingCompiledNamespace, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodBeingCompiledName, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodBeingCompiledNameSignature, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(InlinerNamespace, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(InlinerName, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(InlinerNameSignature, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(InlineeNamespace, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(InlineeName, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(InlineeNameSignature, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(FailAlways, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(FailReason, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer);
if (!success)
{
if (!fixedBuffer)
delete[] buffer;
return ERROR_WRITE_FAULT;
}
do_tracepoint(DotNETRuntime, MethodJitInliningFailed, offset, buffer);
if (!fixedBuffer)
delete[] buffer;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledMethodJitTailCallSucceeded(){ return tracepoint_enabled(DotNETRuntime, MethodJitTailCallSucceeded); }
extern "C" ULONG FireEtXplatMethodJitTailCallSucceeded(
PCWSTR MethodBeingCompiledNamespace,
PCWSTR MethodBeingCompiledName,
PCWSTR MethodBeingCompiledNameSignature,
PCWSTR CallerNamespace,
PCWSTR CallerName,
PCWSTR CallerNameSignature,
PCWSTR CalleeNamespace,
PCWSTR CalleeName,
PCWSTR CalleeNameSignature,
const BOOL TailPrefix,
const unsigned int TailCallType,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledMethodJitTailCallSucceeded())
return ERROR_SUCCESS;
char stackBuffer[586];
char *buffer = stackBuffer;
int offset = 0;
int size = 586;
bool fixedBuffer = true;
bool success = true;
success &= WriteToBuffer(MethodBeingCompiledNamespace, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodBeingCompiledName, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodBeingCompiledNameSignature, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(CallerNamespace, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(CallerName, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(CallerNameSignature, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(CalleeNamespace, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(CalleeName, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(CalleeNameSignature, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(TailPrefix, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(TailCallType, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer);
if (!success)
{
if (!fixedBuffer)
delete[] buffer;
return ERROR_WRITE_FAULT;
}
do_tracepoint(DotNETRuntime, MethodJitTailCallSucceeded, offset, buffer);
if (!fixedBuffer)
delete[] buffer;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledMethodJitTailCallFailed(){ return tracepoint_enabled(DotNETRuntime, MethodJitTailCallFailed); }
extern "C" ULONG FireEtXplatMethodJitTailCallFailed(
PCWSTR MethodBeingCompiledNamespace,
PCWSTR MethodBeingCompiledName,
PCWSTR MethodBeingCompiledNameSignature,
PCWSTR CallerNamespace,
PCWSTR CallerName,
PCWSTR CallerNameSignature,
PCWSTR CalleeNamespace,
PCWSTR CalleeName,
PCWSTR CalleeNameSignature,
const BOOL TailPrefix,
LPCSTR FailReason,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledMethodJitTailCallFailed())
return ERROR_SUCCESS;
char stackBuffer[614];
char *buffer = stackBuffer;
int offset = 0;
int size = 614;
bool fixedBuffer = true;
bool success = true;
success &= WriteToBuffer(MethodBeingCompiledNamespace, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodBeingCompiledName, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodBeingCompiledNameSignature, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(CallerNamespace, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(CallerName, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(CallerNameSignature, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(CalleeNamespace, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(CalleeName, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(CalleeNameSignature, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(TailPrefix, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(FailReason, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer);
if (!success)
{
if (!fixedBuffer)
delete[] buffer;
return ERROR_WRITE_FAULT;
}
do_tracepoint(DotNETRuntime, MethodJitTailCallFailed, offset, buffer);
if (!fixedBuffer)
delete[] buffer;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledMethodILToNativeMap(){ return tracepoint_enabled(DotNETRuntime, MethodILToNativeMap); }
extern "C" ULONG FireEtXplatMethodILToNativeMap(
const unsigned __int64 MethodID,
const unsigned __int64 ReJITID,
const unsigned char MethodExtent,
const unsigned short CountOfMapEntries,
const unsigned int* ILOffsets,
const unsigned int* NativeOffsets,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledMethodILToNativeMap())
return ERROR_SUCCESS;
char stackBuffer[32];
char *buffer = stackBuffer;
int offset = 0;
int size = 32;
bool fixedBuffer = true;
bool success = true;
success &= WriteToBuffer(MethodID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ReJITID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(MethodExtent, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(CountOfMapEntries, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer((const BYTE *)ILOffsets, sizeof(const unsigned int) * (int)CountOfMapEntries, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer((const BYTE *)NativeOffsets, sizeof(const unsigned int) * (int)CountOfMapEntries, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer);
if (!success)
{
if (!fixedBuffer)
delete[] buffer;
return ERROR_WRITE_FAULT;
}
do_tracepoint(DotNETRuntime, MethodILToNativeMap, offset, buffer);
if (!fixedBuffer)
delete[] buffer;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledModuleDCStartV2(){ return tracepoint_enabled(DotNETRuntime, ModuleDCStartV2); }
extern "C" ULONG FireEtXplatModuleDCStartV2(
const unsigned __int64 ModuleID,
const unsigned __int64 AssemblyID,
const unsigned int ModuleFlags,
const unsigned int Reserved1,
PCWSTR ModuleILPath,
PCWSTR ModuleNativePath)
{
if (!EventXplatEnabledModuleDCStartV2())
return ERROR_SUCCESS;
INT ModuleILPath_path_size = -1;
PathCharString ModuleILPath_PS;
INT ModuleILPath_full_name_path_size = (PAL_wcslen(ModuleILPath) + 1)*sizeof(WCHAR);
CHAR* ModuleILPath_full_name = ModuleILPath_PS.OpenStringBuffer(ModuleILPath_full_name_path_size );
if (ModuleILPath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT ModuleNativePath_path_size = -1;
PathCharString ModuleNativePath_PS;
INT ModuleNativePath_full_name_path_size = (PAL_wcslen(ModuleNativePath) + 1)*sizeof(WCHAR);
CHAR* ModuleNativePath_full_name = ModuleNativePath_PS.OpenStringBuffer(ModuleNativePath_full_name_path_size );
if (ModuleNativePath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ModuleILPath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleILPath, -1, ModuleILPath_full_name, ModuleILPath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleILPath_path_size < ModuleILPath_full_name_path_size );
ModuleILPath_PS.CloseBuffer(ModuleILPath_path_size );
if( ModuleILPath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
ModuleNativePath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleNativePath, -1, ModuleNativePath_full_name, ModuleNativePath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleNativePath_path_size < ModuleNativePath_full_name_path_size );
ModuleNativePath_PS.CloseBuffer(ModuleNativePath_path_size );
if( ModuleNativePath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
ModuleDCStartV2,
ModuleID,
AssemblyID,
ModuleFlags,
Reserved1,
ModuleILPath_full_name,
ModuleNativePath_full_name);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledModuleDCEndV2(){ return tracepoint_enabled(DotNETRuntime, ModuleDCEndV2); }
extern "C" ULONG FireEtXplatModuleDCEndV2(
const unsigned __int64 ModuleID,
const unsigned __int64 AssemblyID,
const unsigned int ModuleFlags,
const unsigned int Reserved1,
PCWSTR ModuleILPath,
PCWSTR ModuleNativePath)
{
if (!EventXplatEnabledModuleDCEndV2())
return ERROR_SUCCESS;
INT ModuleILPath_path_size = -1;
PathCharString ModuleILPath_PS;
INT ModuleILPath_full_name_path_size = (PAL_wcslen(ModuleILPath) + 1)*sizeof(WCHAR);
CHAR* ModuleILPath_full_name = ModuleILPath_PS.OpenStringBuffer(ModuleILPath_full_name_path_size );
if (ModuleILPath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT ModuleNativePath_path_size = -1;
PathCharString ModuleNativePath_PS;
INT ModuleNativePath_full_name_path_size = (PAL_wcslen(ModuleNativePath) + 1)*sizeof(WCHAR);
CHAR* ModuleNativePath_full_name = ModuleNativePath_PS.OpenStringBuffer(ModuleNativePath_full_name_path_size );
if (ModuleNativePath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ModuleILPath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleILPath, -1, ModuleILPath_full_name, ModuleILPath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleILPath_path_size < ModuleILPath_full_name_path_size );
ModuleILPath_PS.CloseBuffer(ModuleILPath_path_size );
if( ModuleILPath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
ModuleNativePath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleNativePath, -1, ModuleNativePath_full_name, ModuleNativePath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleNativePath_path_size < ModuleNativePath_full_name_path_size );
ModuleNativePath_PS.CloseBuffer(ModuleNativePath_path_size );
if( ModuleNativePath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
ModuleDCEndV2,
ModuleID,
AssemblyID,
ModuleFlags,
Reserved1,
ModuleILPath_full_name,
ModuleNativePath_full_name);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledDomainModuleLoad(){ return tracepoint_enabled(DotNETRuntime, DomainModuleLoad); }
extern "C" ULONG FireEtXplatDomainModuleLoad(
const unsigned __int64 ModuleID,
const unsigned __int64 AssemblyID,
const unsigned __int64 AppDomainID,
const unsigned int ModuleFlags,
const unsigned int Reserved1,
PCWSTR ModuleILPath,
PCWSTR ModuleNativePath)
{
if (!EventXplatEnabledDomainModuleLoad())
return ERROR_SUCCESS;
INT ModuleILPath_path_size = -1;
PathCharString ModuleILPath_PS;
INT ModuleILPath_full_name_path_size = (PAL_wcslen(ModuleILPath) + 1)*sizeof(WCHAR);
CHAR* ModuleILPath_full_name = ModuleILPath_PS.OpenStringBuffer(ModuleILPath_full_name_path_size );
if (ModuleILPath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT ModuleNativePath_path_size = -1;
PathCharString ModuleNativePath_PS;
INT ModuleNativePath_full_name_path_size = (PAL_wcslen(ModuleNativePath) + 1)*sizeof(WCHAR);
CHAR* ModuleNativePath_full_name = ModuleNativePath_PS.OpenStringBuffer(ModuleNativePath_full_name_path_size );
if (ModuleNativePath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ModuleILPath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleILPath, -1, ModuleILPath_full_name, ModuleILPath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleILPath_path_size < ModuleILPath_full_name_path_size );
ModuleILPath_PS.CloseBuffer(ModuleILPath_path_size );
if( ModuleILPath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
ModuleNativePath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleNativePath, -1, ModuleNativePath_full_name, ModuleNativePath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleNativePath_path_size < ModuleNativePath_full_name_path_size );
ModuleNativePath_PS.CloseBuffer(ModuleNativePath_path_size );
if( ModuleNativePath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
DomainModuleLoad,
ModuleID,
AssemblyID,
AppDomainID,
ModuleFlags,
Reserved1,
ModuleILPath_full_name,
ModuleNativePath_full_name);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledDomainModuleLoad_V1(){ return tracepoint_enabled(DotNETRuntime, DomainModuleLoad_V1); }
extern "C" ULONG FireEtXplatDomainModuleLoad_V1(
const unsigned __int64 ModuleID,
const unsigned __int64 AssemblyID,
const unsigned __int64 AppDomainID,
const unsigned int ModuleFlags,
const unsigned int Reserved1,
PCWSTR ModuleILPath,
PCWSTR ModuleNativePath,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledDomainModuleLoad_V1())
return ERROR_SUCCESS;
INT ModuleILPath_path_size = -1;
PathCharString ModuleILPath_PS;
INT ModuleILPath_full_name_path_size = (PAL_wcslen(ModuleILPath) + 1)*sizeof(WCHAR);
CHAR* ModuleILPath_full_name = ModuleILPath_PS.OpenStringBuffer(ModuleILPath_full_name_path_size );
if (ModuleILPath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT ModuleNativePath_path_size = -1;
PathCharString ModuleNativePath_PS;
INT ModuleNativePath_full_name_path_size = (PAL_wcslen(ModuleNativePath) + 1)*sizeof(WCHAR);
CHAR* ModuleNativePath_full_name = ModuleNativePath_PS.OpenStringBuffer(ModuleNativePath_full_name_path_size );
if (ModuleNativePath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ModuleILPath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleILPath, -1, ModuleILPath_full_name, ModuleILPath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleILPath_path_size < ModuleILPath_full_name_path_size );
ModuleILPath_PS.CloseBuffer(ModuleILPath_path_size );
if( ModuleILPath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
ModuleNativePath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleNativePath, -1, ModuleNativePath_full_name, ModuleNativePath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleNativePath_path_size < ModuleNativePath_full_name_path_size );
ModuleNativePath_PS.CloseBuffer(ModuleNativePath_path_size );
if( ModuleNativePath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
DomainModuleLoad_V1,
ModuleID,
AssemblyID,
AppDomainID,
ModuleFlags,
Reserved1,
ModuleILPath_full_name,
ModuleNativePath_full_name,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledModuleLoad(){ return tracepoint_enabled(DotNETRuntime, ModuleLoad); }
extern "C" ULONG FireEtXplatModuleLoad(
const unsigned __int64 ModuleID,
const unsigned __int64 AssemblyID,
const unsigned int ModuleFlags,
const unsigned int Reserved1,
PCWSTR ModuleILPath,
PCWSTR ModuleNativePath)
{
if (!EventXplatEnabledModuleLoad())
return ERROR_SUCCESS;
INT ModuleILPath_path_size = -1;
PathCharString ModuleILPath_PS;
INT ModuleILPath_full_name_path_size = (PAL_wcslen(ModuleILPath) + 1)*sizeof(WCHAR);
CHAR* ModuleILPath_full_name = ModuleILPath_PS.OpenStringBuffer(ModuleILPath_full_name_path_size );
if (ModuleILPath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT ModuleNativePath_path_size = -1;
PathCharString ModuleNativePath_PS;
INT ModuleNativePath_full_name_path_size = (PAL_wcslen(ModuleNativePath) + 1)*sizeof(WCHAR);
CHAR* ModuleNativePath_full_name = ModuleNativePath_PS.OpenStringBuffer(ModuleNativePath_full_name_path_size );
if (ModuleNativePath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ModuleILPath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleILPath, -1, ModuleILPath_full_name, ModuleILPath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleILPath_path_size < ModuleILPath_full_name_path_size );
ModuleILPath_PS.CloseBuffer(ModuleILPath_path_size );
if( ModuleILPath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
ModuleNativePath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleNativePath, -1, ModuleNativePath_full_name, ModuleNativePath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleNativePath_path_size < ModuleNativePath_full_name_path_size );
ModuleNativePath_PS.CloseBuffer(ModuleNativePath_path_size );
if( ModuleNativePath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
ModuleLoad,
ModuleID,
AssemblyID,
ModuleFlags,
Reserved1,
ModuleILPath_full_name,
ModuleNativePath_full_name);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledModuleLoad_V1(){ return tracepoint_enabled(DotNETRuntime, ModuleLoad_V1); }
extern "C" ULONG FireEtXplatModuleLoad_V1(
const unsigned __int64 ModuleID,
const unsigned __int64 AssemblyID,
const unsigned int ModuleFlags,
const unsigned int Reserved1,
PCWSTR ModuleILPath,
PCWSTR ModuleNativePath,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledModuleLoad_V1())
return ERROR_SUCCESS;
INT ModuleILPath_path_size = -1;
PathCharString ModuleILPath_PS;
INT ModuleILPath_full_name_path_size = (PAL_wcslen(ModuleILPath) + 1)*sizeof(WCHAR);
CHAR* ModuleILPath_full_name = ModuleILPath_PS.OpenStringBuffer(ModuleILPath_full_name_path_size );
if (ModuleILPath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT ModuleNativePath_path_size = -1;
PathCharString ModuleNativePath_PS;
INT ModuleNativePath_full_name_path_size = (PAL_wcslen(ModuleNativePath) + 1)*sizeof(WCHAR);
CHAR* ModuleNativePath_full_name = ModuleNativePath_PS.OpenStringBuffer(ModuleNativePath_full_name_path_size );
if (ModuleNativePath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ModuleILPath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleILPath, -1, ModuleILPath_full_name, ModuleILPath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleILPath_path_size < ModuleILPath_full_name_path_size );
ModuleILPath_PS.CloseBuffer(ModuleILPath_path_size );
if( ModuleILPath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
ModuleNativePath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleNativePath, -1, ModuleNativePath_full_name, ModuleNativePath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleNativePath_path_size < ModuleNativePath_full_name_path_size );
ModuleNativePath_PS.CloseBuffer(ModuleNativePath_path_size );
if( ModuleNativePath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
ModuleLoad_V1,
ModuleID,
AssemblyID,
ModuleFlags,
Reserved1,
ModuleILPath_full_name,
ModuleNativePath_full_name,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledModuleLoad_V2(){ return tracepoint_enabled(DotNETRuntime, ModuleLoad_V2); }
extern "C" ULONG FireEtXplatModuleLoad_V2(
const unsigned __int64 ModuleID,
const unsigned __int64 AssemblyID,
const unsigned int ModuleFlags,
const unsigned int Reserved1,
PCWSTR ModuleILPath,
PCWSTR ModuleNativePath,
const unsigned short ClrInstanceID,
const GUID* ManagedPdbSignature,
const unsigned int ManagedPdbAge,
PCWSTR ManagedPdbBuildPath,
const GUID* NativePdbSignature,
const unsigned int NativePdbAge,
PCWSTR NativePdbBuildPath)
{
if (!EventXplatEnabledModuleLoad_V2())
return ERROR_SUCCESS;
char stackBuffer[290];
char *buffer = stackBuffer;
int offset = 0;
int size = 290;
bool fixedBuffer = true;
bool success = true;
success &= WriteToBuffer(ModuleID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(AssemblyID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ModuleFlags, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(Reserved1, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ModuleILPath, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ModuleNativePath, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(*ManagedPdbSignature, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ManagedPdbAge, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ManagedPdbBuildPath, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(*NativePdbSignature, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(NativePdbAge, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(NativePdbBuildPath, buffer, offset, size, fixedBuffer);
if (!success)
{
if (!fixedBuffer)
delete[] buffer;
return ERROR_WRITE_FAULT;
}
do_tracepoint(DotNETRuntime, ModuleLoad_V2, offset, buffer);
if (!fixedBuffer)
delete[] buffer;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledModuleUnload(){ return tracepoint_enabled(DotNETRuntime, ModuleUnload); }
extern "C" ULONG FireEtXplatModuleUnload(
const unsigned __int64 ModuleID,
const unsigned __int64 AssemblyID,
const unsigned int ModuleFlags,
const unsigned int Reserved1,
PCWSTR ModuleILPath,
PCWSTR ModuleNativePath)
{
if (!EventXplatEnabledModuleUnload())
return ERROR_SUCCESS;
INT ModuleILPath_path_size = -1;
PathCharString ModuleILPath_PS;
INT ModuleILPath_full_name_path_size = (PAL_wcslen(ModuleILPath) + 1)*sizeof(WCHAR);
CHAR* ModuleILPath_full_name = ModuleILPath_PS.OpenStringBuffer(ModuleILPath_full_name_path_size );
if (ModuleILPath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT ModuleNativePath_path_size = -1;
PathCharString ModuleNativePath_PS;
INT ModuleNativePath_full_name_path_size = (PAL_wcslen(ModuleNativePath) + 1)*sizeof(WCHAR);
CHAR* ModuleNativePath_full_name = ModuleNativePath_PS.OpenStringBuffer(ModuleNativePath_full_name_path_size );
if (ModuleNativePath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ModuleILPath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleILPath, -1, ModuleILPath_full_name, ModuleILPath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleILPath_path_size < ModuleILPath_full_name_path_size );
ModuleILPath_PS.CloseBuffer(ModuleILPath_path_size );
if( ModuleILPath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
ModuleNativePath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleNativePath, -1, ModuleNativePath_full_name, ModuleNativePath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleNativePath_path_size < ModuleNativePath_full_name_path_size );
ModuleNativePath_PS.CloseBuffer(ModuleNativePath_path_size );
if( ModuleNativePath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
ModuleUnload,
ModuleID,
AssemblyID,
ModuleFlags,
Reserved1,
ModuleILPath_full_name,
ModuleNativePath_full_name);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledModuleUnload_V1(){ return tracepoint_enabled(DotNETRuntime, ModuleUnload_V1); }
extern "C" ULONG FireEtXplatModuleUnload_V1(
const unsigned __int64 ModuleID,
const unsigned __int64 AssemblyID,
const unsigned int ModuleFlags,
const unsigned int Reserved1,
PCWSTR ModuleILPath,
PCWSTR ModuleNativePath,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledModuleUnload_V1())
return ERROR_SUCCESS;
INT ModuleILPath_path_size = -1;
PathCharString ModuleILPath_PS;
INT ModuleILPath_full_name_path_size = (PAL_wcslen(ModuleILPath) + 1)*sizeof(WCHAR);
CHAR* ModuleILPath_full_name = ModuleILPath_PS.OpenStringBuffer(ModuleILPath_full_name_path_size );
if (ModuleILPath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT ModuleNativePath_path_size = -1;
PathCharString ModuleNativePath_PS;
INT ModuleNativePath_full_name_path_size = (PAL_wcslen(ModuleNativePath) + 1)*sizeof(WCHAR);
CHAR* ModuleNativePath_full_name = ModuleNativePath_PS.OpenStringBuffer(ModuleNativePath_full_name_path_size );
if (ModuleNativePath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ModuleILPath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleILPath, -1, ModuleILPath_full_name, ModuleILPath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleILPath_path_size < ModuleILPath_full_name_path_size );
ModuleILPath_PS.CloseBuffer(ModuleILPath_path_size );
if( ModuleILPath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
ModuleNativePath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleNativePath, -1, ModuleNativePath_full_name, ModuleNativePath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleNativePath_path_size < ModuleNativePath_full_name_path_size );
ModuleNativePath_PS.CloseBuffer(ModuleNativePath_path_size );
if( ModuleNativePath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
ModuleUnload_V1,
ModuleID,
AssemblyID,
ModuleFlags,
Reserved1,
ModuleILPath_full_name,
ModuleNativePath_full_name,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledModuleUnload_V2(){ return tracepoint_enabled(DotNETRuntime, ModuleUnload_V2); }
extern "C" ULONG FireEtXplatModuleUnload_V2(
const unsigned __int64 ModuleID,
const unsigned __int64 AssemblyID,
const unsigned int ModuleFlags,
const unsigned int Reserved1,
PCWSTR ModuleILPath,
PCWSTR ModuleNativePath,
const unsigned short ClrInstanceID,
const GUID* ManagedPdbSignature,
const unsigned int ManagedPdbAge,
PCWSTR ManagedPdbBuildPath,
const GUID* NativePdbSignature,
const unsigned int NativePdbAge,
PCWSTR NativePdbBuildPath)
{
if (!EventXplatEnabledModuleUnload_V2())
return ERROR_SUCCESS;
char stackBuffer[290];
char *buffer = stackBuffer;
int offset = 0;
int size = 290;
bool fixedBuffer = true;
bool success = true;
success &= WriteToBuffer(ModuleID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(AssemblyID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ModuleFlags, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(Reserved1, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ModuleILPath, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ModuleNativePath, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(*ManagedPdbSignature, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ManagedPdbAge, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ManagedPdbBuildPath, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(*NativePdbSignature, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(NativePdbAge, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(NativePdbBuildPath, buffer, offset, size, fixedBuffer);
if (!success)
{
if (!fixedBuffer)
delete[] buffer;
return ERROR_WRITE_FAULT;
}
do_tracepoint(DotNETRuntime, ModuleUnload_V2, offset, buffer);
if (!fixedBuffer)
delete[] buffer;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledAssemblyLoad(){ return tracepoint_enabled(DotNETRuntime, AssemblyLoad); }
extern "C" ULONG FireEtXplatAssemblyLoad(
const unsigned __int64 AssemblyID,
const unsigned __int64 AppDomainID,
const unsigned int AssemblyFlags,
PCWSTR FullyQualifiedAssemblyName)
{
if (!EventXplatEnabledAssemblyLoad())
return ERROR_SUCCESS;
INT FullyQualifiedAssemblyName_path_size = -1;
PathCharString FullyQualifiedAssemblyName_PS;
INT FullyQualifiedAssemblyName_full_name_path_size = (PAL_wcslen(FullyQualifiedAssemblyName) + 1)*sizeof(WCHAR);
CHAR* FullyQualifiedAssemblyName_full_name = FullyQualifiedAssemblyName_PS.OpenStringBuffer(FullyQualifiedAssemblyName_full_name_path_size );
if (FullyQualifiedAssemblyName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
FullyQualifiedAssemblyName_path_size = WideCharToMultiByte( CP_ACP, 0, FullyQualifiedAssemblyName, -1, FullyQualifiedAssemblyName_full_name, FullyQualifiedAssemblyName_full_name_path_size, NULL, NULL );
_ASSERTE(FullyQualifiedAssemblyName_path_size < FullyQualifiedAssemblyName_full_name_path_size );
FullyQualifiedAssemblyName_PS.CloseBuffer(FullyQualifiedAssemblyName_path_size );
if( FullyQualifiedAssemblyName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
AssemblyLoad,
AssemblyID,
AppDomainID,
AssemblyFlags,
FullyQualifiedAssemblyName_full_name);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledAssemblyLoad_V1(){ return tracepoint_enabled(DotNETRuntime, AssemblyLoad_V1); }
extern "C" ULONG FireEtXplatAssemblyLoad_V1(
const unsigned __int64 AssemblyID,
const unsigned __int64 AppDomainID,
const unsigned __int64 BindingID,
const unsigned int AssemblyFlags,
PCWSTR FullyQualifiedAssemblyName,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledAssemblyLoad_V1())
return ERROR_SUCCESS;
INT FullyQualifiedAssemblyName_path_size = -1;
PathCharString FullyQualifiedAssemblyName_PS;
INT FullyQualifiedAssemblyName_full_name_path_size = (PAL_wcslen(FullyQualifiedAssemblyName) + 1)*sizeof(WCHAR);
CHAR* FullyQualifiedAssemblyName_full_name = FullyQualifiedAssemblyName_PS.OpenStringBuffer(FullyQualifiedAssemblyName_full_name_path_size );
if (FullyQualifiedAssemblyName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
FullyQualifiedAssemblyName_path_size = WideCharToMultiByte( CP_ACP, 0, FullyQualifiedAssemblyName, -1, FullyQualifiedAssemblyName_full_name, FullyQualifiedAssemblyName_full_name_path_size, NULL, NULL );
_ASSERTE(FullyQualifiedAssemblyName_path_size < FullyQualifiedAssemblyName_full_name_path_size );
FullyQualifiedAssemblyName_PS.CloseBuffer(FullyQualifiedAssemblyName_path_size );
if( FullyQualifiedAssemblyName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
AssemblyLoad_V1,
AssemblyID,
AppDomainID,
BindingID,
AssemblyFlags,
FullyQualifiedAssemblyName_full_name,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledAssemblyUnload(){ return tracepoint_enabled(DotNETRuntime, AssemblyUnload); }
extern "C" ULONG FireEtXplatAssemblyUnload(
const unsigned __int64 AssemblyID,
const unsigned __int64 AppDomainID,
const unsigned int AssemblyFlags,
PCWSTR FullyQualifiedAssemblyName)
{
if (!EventXplatEnabledAssemblyUnload())
return ERROR_SUCCESS;
INT FullyQualifiedAssemblyName_path_size = -1;
PathCharString FullyQualifiedAssemblyName_PS;
INT FullyQualifiedAssemblyName_full_name_path_size = (PAL_wcslen(FullyQualifiedAssemblyName) + 1)*sizeof(WCHAR);
CHAR* FullyQualifiedAssemblyName_full_name = FullyQualifiedAssemblyName_PS.OpenStringBuffer(FullyQualifiedAssemblyName_full_name_path_size );
if (FullyQualifiedAssemblyName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
FullyQualifiedAssemblyName_path_size = WideCharToMultiByte( CP_ACP, 0, FullyQualifiedAssemblyName, -1, FullyQualifiedAssemblyName_full_name, FullyQualifiedAssemblyName_full_name_path_size, NULL, NULL );
_ASSERTE(FullyQualifiedAssemblyName_path_size < FullyQualifiedAssemblyName_full_name_path_size );
FullyQualifiedAssemblyName_PS.CloseBuffer(FullyQualifiedAssemblyName_path_size );
if( FullyQualifiedAssemblyName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
AssemblyUnload,
AssemblyID,
AppDomainID,
AssemblyFlags,
FullyQualifiedAssemblyName_full_name);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledAssemblyUnload_V1(){ return tracepoint_enabled(DotNETRuntime, AssemblyUnload_V1); }
extern "C" ULONG FireEtXplatAssemblyUnload_V1(
const unsigned __int64 AssemblyID,
const unsigned __int64 AppDomainID,
const unsigned __int64 BindingID,
const unsigned int AssemblyFlags,
PCWSTR FullyQualifiedAssemblyName,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledAssemblyUnload_V1())
return ERROR_SUCCESS;
INT FullyQualifiedAssemblyName_path_size = -1;
PathCharString FullyQualifiedAssemblyName_PS;
INT FullyQualifiedAssemblyName_full_name_path_size = (PAL_wcslen(FullyQualifiedAssemblyName) + 1)*sizeof(WCHAR);
CHAR* FullyQualifiedAssemblyName_full_name = FullyQualifiedAssemblyName_PS.OpenStringBuffer(FullyQualifiedAssemblyName_full_name_path_size );
if (FullyQualifiedAssemblyName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
FullyQualifiedAssemblyName_path_size = WideCharToMultiByte( CP_ACP, 0, FullyQualifiedAssemblyName, -1, FullyQualifiedAssemblyName_full_name, FullyQualifiedAssemblyName_full_name_path_size, NULL, NULL );
_ASSERTE(FullyQualifiedAssemblyName_path_size < FullyQualifiedAssemblyName_full_name_path_size );
FullyQualifiedAssemblyName_PS.CloseBuffer(FullyQualifiedAssemblyName_path_size );
if( FullyQualifiedAssemblyName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
AssemblyUnload_V1,
AssemblyID,
AppDomainID,
BindingID,
AssemblyFlags,
FullyQualifiedAssemblyName_full_name,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledAppDomainLoad(){ return tracepoint_enabled(DotNETRuntime, AppDomainLoad); }
extern "C" ULONG FireEtXplatAppDomainLoad(
const unsigned __int64 AppDomainID,
const unsigned int AppDomainFlags,
PCWSTR AppDomainName)
{
if (!EventXplatEnabledAppDomainLoad())
return ERROR_SUCCESS;
INT AppDomainName_path_size = -1;
PathCharString AppDomainName_PS;
INT AppDomainName_full_name_path_size = (PAL_wcslen(AppDomainName) + 1)*sizeof(WCHAR);
CHAR* AppDomainName_full_name = AppDomainName_PS.OpenStringBuffer(AppDomainName_full_name_path_size );
if (AppDomainName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
AppDomainName_path_size = WideCharToMultiByte( CP_ACP, 0, AppDomainName, -1, AppDomainName_full_name, AppDomainName_full_name_path_size, NULL, NULL );
_ASSERTE(AppDomainName_path_size < AppDomainName_full_name_path_size );
AppDomainName_PS.CloseBuffer(AppDomainName_path_size );
if( AppDomainName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
AppDomainLoad,
AppDomainID,
AppDomainFlags,
AppDomainName_full_name);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledAppDomainLoad_V1(){ return tracepoint_enabled(DotNETRuntime, AppDomainLoad_V1); }
extern "C" ULONG FireEtXplatAppDomainLoad_V1(
const unsigned __int64 AppDomainID,
const unsigned int AppDomainFlags,
PCWSTR AppDomainName,
const unsigned int AppDomainIndex,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledAppDomainLoad_V1())
return ERROR_SUCCESS;
INT AppDomainName_path_size = -1;
PathCharString AppDomainName_PS;
INT AppDomainName_full_name_path_size = (PAL_wcslen(AppDomainName) + 1)*sizeof(WCHAR);
CHAR* AppDomainName_full_name = AppDomainName_PS.OpenStringBuffer(AppDomainName_full_name_path_size );
if (AppDomainName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
AppDomainName_path_size = WideCharToMultiByte( CP_ACP, 0, AppDomainName, -1, AppDomainName_full_name, AppDomainName_full_name_path_size, NULL, NULL );
_ASSERTE(AppDomainName_path_size < AppDomainName_full_name_path_size );
AppDomainName_PS.CloseBuffer(AppDomainName_path_size );
if( AppDomainName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
AppDomainLoad_V1,
AppDomainID,
AppDomainFlags,
AppDomainName_full_name,
AppDomainIndex,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledAppDomainUnload(){ return tracepoint_enabled(DotNETRuntime, AppDomainUnload); }
extern "C" ULONG FireEtXplatAppDomainUnload(
const unsigned __int64 AppDomainID,
const unsigned int AppDomainFlags,
PCWSTR AppDomainName)
{
if (!EventXplatEnabledAppDomainUnload())
return ERROR_SUCCESS;
INT AppDomainName_path_size = -1;
PathCharString AppDomainName_PS;
INT AppDomainName_full_name_path_size = (PAL_wcslen(AppDomainName) + 1)*sizeof(WCHAR);
CHAR* AppDomainName_full_name = AppDomainName_PS.OpenStringBuffer(AppDomainName_full_name_path_size );
if (AppDomainName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
AppDomainName_path_size = WideCharToMultiByte( CP_ACP, 0, AppDomainName, -1, AppDomainName_full_name, AppDomainName_full_name_path_size, NULL, NULL );
_ASSERTE(AppDomainName_path_size < AppDomainName_full_name_path_size );
AppDomainName_PS.CloseBuffer(AppDomainName_path_size );
if( AppDomainName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
AppDomainUnload,
AppDomainID,
AppDomainFlags,
AppDomainName_full_name);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledAppDomainUnload_V1(){ return tracepoint_enabled(DotNETRuntime, AppDomainUnload_V1); }
extern "C" ULONG FireEtXplatAppDomainUnload_V1(
const unsigned __int64 AppDomainID,
const unsigned int AppDomainFlags,
PCWSTR AppDomainName,
const unsigned int AppDomainIndex,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledAppDomainUnload_V1())
return ERROR_SUCCESS;
INT AppDomainName_path_size = -1;
PathCharString AppDomainName_PS;
INT AppDomainName_full_name_path_size = (PAL_wcslen(AppDomainName) + 1)*sizeof(WCHAR);
CHAR* AppDomainName_full_name = AppDomainName_PS.OpenStringBuffer(AppDomainName_full_name_path_size );
if (AppDomainName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
AppDomainName_path_size = WideCharToMultiByte( CP_ACP, 0, AppDomainName, -1, AppDomainName_full_name, AppDomainName_full_name_path_size, NULL, NULL );
_ASSERTE(AppDomainName_path_size < AppDomainName_full_name_path_size );
AppDomainName_PS.CloseBuffer(AppDomainName_path_size );
if( AppDomainName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
AppDomainUnload_V1,
AppDomainID,
AppDomainFlags,
AppDomainName_full_name,
AppDomainIndex,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledModuleRangeLoad(){ return tracepoint_enabled(DotNETRuntime, ModuleRangeLoad); }
extern "C" ULONG FireEtXplatModuleRangeLoad(
const unsigned short ClrInstanceID,
const unsigned __int64 ModuleID,
const unsigned int RangeBegin,
const unsigned int RangeSize,
const unsigned char RangeType)
{
if (!EventXplatEnabledModuleRangeLoad())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
ModuleRangeLoad,
ClrInstanceID,
ModuleID,
RangeBegin,
RangeSize,
RangeType);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledStrongNameVerificationStart(){ return tracepoint_enabled(DotNETRuntime, StrongNameVerificationStart); }
extern "C" ULONG FireEtXplatStrongNameVerificationStart(
const unsigned int VerificationFlags,
const unsigned int ErrorCode,
PCWSTR FullyQualifiedAssemblyName)
{
if (!EventXplatEnabledStrongNameVerificationStart())
return ERROR_SUCCESS;
INT FullyQualifiedAssemblyName_path_size = -1;
PathCharString FullyQualifiedAssemblyName_PS;
INT FullyQualifiedAssemblyName_full_name_path_size = (PAL_wcslen(FullyQualifiedAssemblyName) + 1)*sizeof(WCHAR);
CHAR* FullyQualifiedAssemblyName_full_name = FullyQualifiedAssemblyName_PS.OpenStringBuffer(FullyQualifiedAssemblyName_full_name_path_size );
if (FullyQualifiedAssemblyName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
FullyQualifiedAssemblyName_path_size = WideCharToMultiByte( CP_ACP, 0, FullyQualifiedAssemblyName, -1, FullyQualifiedAssemblyName_full_name, FullyQualifiedAssemblyName_full_name_path_size, NULL, NULL );
_ASSERTE(FullyQualifiedAssemblyName_path_size < FullyQualifiedAssemblyName_full_name_path_size );
FullyQualifiedAssemblyName_PS.CloseBuffer(FullyQualifiedAssemblyName_path_size );
if( FullyQualifiedAssemblyName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
StrongNameVerificationStart,
VerificationFlags,
ErrorCode,
FullyQualifiedAssemblyName_full_name);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledStrongNameVerificationStart_V1(){ return tracepoint_enabled(DotNETRuntime, StrongNameVerificationStart_V1); }
extern "C" ULONG FireEtXplatStrongNameVerificationStart_V1(
const unsigned int VerificationFlags,
const unsigned int ErrorCode,
PCWSTR FullyQualifiedAssemblyName,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledStrongNameVerificationStart_V1())
return ERROR_SUCCESS;
INT FullyQualifiedAssemblyName_path_size = -1;
PathCharString FullyQualifiedAssemblyName_PS;
INT FullyQualifiedAssemblyName_full_name_path_size = (PAL_wcslen(FullyQualifiedAssemblyName) + 1)*sizeof(WCHAR);
CHAR* FullyQualifiedAssemblyName_full_name = FullyQualifiedAssemblyName_PS.OpenStringBuffer(FullyQualifiedAssemblyName_full_name_path_size );
if (FullyQualifiedAssemblyName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
FullyQualifiedAssemblyName_path_size = WideCharToMultiByte( CP_ACP, 0, FullyQualifiedAssemblyName, -1, FullyQualifiedAssemblyName_full_name, FullyQualifiedAssemblyName_full_name_path_size, NULL, NULL );
_ASSERTE(FullyQualifiedAssemblyName_path_size < FullyQualifiedAssemblyName_full_name_path_size );
FullyQualifiedAssemblyName_PS.CloseBuffer(FullyQualifiedAssemblyName_path_size );
if( FullyQualifiedAssemblyName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
StrongNameVerificationStart_V1,
VerificationFlags,
ErrorCode,
FullyQualifiedAssemblyName_full_name,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledStrongNameVerificationStop(){ return tracepoint_enabled(DotNETRuntime, StrongNameVerificationStop); }
extern "C" ULONG FireEtXplatStrongNameVerificationStop(
const unsigned int VerificationFlags,
const unsigned int ErrorCode,
PCWSTR FullyQualifiedAssemblyName)
{
if (!EventXplatEnabledStrongNameVerificationStop())
return ERROR_SUCCESS;
INT FullyQualifiedAssemblyName_path_size = -1;
PathCharString FullyQualifiedAssemblyName_PS;
INT FullyQualifiedAssemblyName_full_name_path_size = (PAL_wcslen(FullyQualifiedAssemblyName) + 1)*sizeof(WCHAR);
CHAR* FullyQualifiedAssemblyName_full_name = FullyQualifiedAssemblyName_PS.OpenStringBuffer(FullyQualifiedAssemblyName_full_name_path_size );
if (FullyQualifiedAssemblyName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
FullyQualifiedAssemblyName_path_size = WideCharToMultiByte( CP_ACP, 0, FullyQualifiedAssemblyName, -1, FullyQualifiedAssemblyName_full_name, FullyQualifiedAssemblyName_full_name_path_size, NULL, NULL );
_ASSERTE(FullyQualifiedAssemblyName_path_size < FullyQualifiedAssemblyName_full_name_path_size );
FullyQualifiedAssemblyName_PS.CloseBuffer(FullyQualifiedAssemblyName_path_size );
if( FullyQualifiedAssemblyName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
StrongNameVerificationStop,
VerificationFlags,
ErrorCode,
FullyQualifiedAssemblyName_full_name);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledStrongNameVerificationStop_V1(){ return tracepoint_enabled(DotNETRuntime, StrongNameVerificationStop_V1); }
extern "C" ULONG FireEtXplatStrongNameVerificationStop_V1(
const unsigned int VerificationFlags,
const unsigned int ErrorCode,
PCWSTR FullyQualifiedAssemblyName,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledStrongNameVerificationStop_V1())
return ERROR_SUCCESS;
INT FullyQualifiedAssemblyName_path_size = -1;
PathCharString FullyQualifiedAssemblyName_PS;
INT FullyQualifiedAssemblyName_full_name_path_size = (PAL_wcslen(FullyQualifiedAssemblyName) + 1)*sizeof(WCHAR);
CHAR* FullyQualifiedAssemblyName_full_name = FullyQualifiedAssemblyName_PS.OpenStringBuffer(FullyQualifiedAssemblyName_full_name_path_size );
if (FullyQualifiedAssemblyName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
FullyQualifiedAssemblyName_path_size = WideCharToMultiByte( CP_ACP, 0, FullyQualifiedAssemblyName, -1, FullyQualifiedAssemblyName_full_name, FullyQualifiedAssemblyName_full_name_path_size, NULL, NULL );
_ASSERTE(FullyQualifiedAssemblyName_path_size < FullyQualifiedAssemblyName_full_name_path_size );
FullyQualifiedAssemblyName_PS.CloseBuffer(FullyQualifiedAssemblyName_path_size );
if( FullyQualifiedAssemblyName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
StrongNameVerificationStop_V1,
VerificationFlags,
ErrorCode,
FullyQualifiedAssemblyName_full_name,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledAuthenticodeVerificationStart(){ return tracepoint_enabled(DotNETRuntime, AuthenticodeVerificationStart); }
extern "C" ULONG FireEtXplatAuthenticodeVerificationStart(
const unsigned int VerificationFlags,
const unsigned int ErrorCode,
PCWSTR ModulePath)
{
if (!EventXplatEnabledAuthenticodeVerificationStart())
return ERROR_SUCCESS;
INT ModulePath_path_size = -1;
PathCharString ModulePath_PS;
INT ModulePath_full_name_path_size = (PAL_wcslen(ModulePath) + 1)*sizeof(WCHAR);
CHAR* ModulePath_full_name = ModulePath_PS.OpenStringBuffer(ModulePath_full_name_path_size );
if (ModulePath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ModulePath_path_size = WideCharToMultiByte( CP_ACP, 0, ModulePath, -1, ModulePath_full_name, ModulePath_full_name_path_size, NULL, NULL );
_ASSERTE(ModulePath_path_size < ModulePath_full_name_path_size );
ModulePath_PS.CloseBuffer(ModulePath_path_size );
if( ModulePath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
AuthenticodeVerificationStart,
VerificationFlags,
ErrorCode,
ModulePath_full_name);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledAuthenticodeVerificationStart_V1(){ return tracepoint_enabled(DotNETRuntime, AuthenticodeVerificationStart_V1); }
extern "C" ULONG FireEtXplatAuthenticodeVerificationStart_V1(
const unsigned int VerificationFlags,
const unsigned int ErrorCode,
PCWSTR ModulePath,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledAuthenticodeVerificationStart_V1())
return ERROR_SUCCESS;
INT ModulePath_path_size = -1;
PathCharString ModulePath_PS;
INT ModulePath_full_name_path_size = (PAL_wcslen(ModulePath) + 1)*sizeof(WCHAR);
CHAR* ModulePath_full_name = ModulePath_PS.OpenStringBuffer(ModulePath_full_name_path_size );
if (ModulePath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ModulePath_path_size = WideCharToMultiByte( CP_ACP, 0, ModulePath, -1, ModulePath_full_name, ModulePath_full_name_path_size, NULL, NULL );
_ASSERTE(ModulePath_path_size < ModulePath_full_name_path_size );
ModulePath_PS.CloseBuffer(ModulePath_path_size );
if( ModulePath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
AuthenticodeVerificationStart_V1,
VerificationFlags,
ErrorCode,
ModulePath_full_name,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledAuthenticodeVerificationStop(){ return tracepoint_enabled(DotNETRuntime, AuthenticodeVerificationStop); }
extern "C" ULONG FireEtXplatAuthenticodeVerificationStop(
const unsigned int VerificationFlags,
const unsigned int ErrorCode,
PCWSTR ModulePath)
{
if (!EventXplatEnabledAuthenticodeVerificationStop())
return ERROR_SUCCESS;
INT ModulePath_path_size = -1;
PathCharString ModulePath_PS;
INT ModulePath_full_name_path_size = (PAL_wcslen(ModulePath) + 1)*sizeof(WCHAR);
CHAR* ModulePath_full_name = ModulePath_PS.OpenStringBuffer(ModulePath_full_name_path_size );
if (ModulePath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ModulePath_path_size = WideCharToMultiByte( CP_ACP, 0, ModulePath, -1, ModulePath_full_name, ModulePath_full_name_path_size, NULL, NULL );
_ASSERTE(ModulePath_path_size < ModulePath_full_name_path_size );
ModulePath_PS.CloseBuffer(ModulePath_path_size );
if( ModulePath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
AuthenticodeVerificationStop,
VerificationFlags,
ErrorCode,
ModulePath_full_name);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledAuthenticodeVerificationStop_V1(){ return tracepoint_enabled(DotNETRuntime, AuthenticodeVerificationStop_V1); }
extern "C" ULONG FireEtXplatAuthenticodeVerificationStop_V1(
const unsigned int VerificationFlags,
const unsigned int ErrorCode,
PCWSTR ModulePath,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledAuthenticodeVerificationStop_V1())
return ERROR_SUCCESS;
INT ModulePath_path_size = -1;
PathCharString ModulePath_PS;
INT ModulePath_full_name_path_size = (PAL_wcslen(ModulePath) + 1)*sizeof(WCHAR);
CHAR* ModulePath_full_name = ModulePath_PS.OpenStringBuffer(ModulePath_full_name_path_size );
if (ModulePath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ModulePath_path_size = WideCharToMultiByte( CP_ACP, 0, ModulePath, -1, ModulePath_full_name, ModulePath_full_name_path_size, NULL, NULL );
_ASSERTE(ModulePath_path_size < ModulePath_full_name_path_size );
ModulePath_PS.CloseBuffer(ModulePath_path_size );
if( ModulePath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
AuthenticodeVerificationStop_V1,
VerificationFlags,
ErrorCode,
ModulePath_full_name,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledRuntimeInformationStart(){ return tracepoint_enabled(DotNETRuntime, RuntimeInformationStart); }
extern "C" ULONG FireEtXplatRuntimeInformationStart(
const unsigned short ClrInstanceID,
const unsigned short Sku,
const unsigned short BclMajorVersion,
const unsigned short BclMinorVersion,
const unsigned short BclBuildNumber,
const unsigned short BclQfeNumber,
const unsigned short VMMajorVersion,
const unsigned short VMMinorVersion,
const unsigned short VMBuildNumber,
const unsigned short VMQfeNumber,
const unsigned int StartupFlags,
const unsigned char StartupMode,
PCWSTR CommandLine,
const GUID* ComObjectGuid,
PCWSTR RuntimeDllPath)
{
if (!EventXplatEnabledRuntimeInformationStart())
return ERROR_SUCCESS;
char stackBuffer[153];
char *buffer = stackBuffer;
int offset = 0;
int size = 153;
bool fixedBuffer = true;
bool success = true;
success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(Sku, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(BclMajorVersion, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(BclMinorVersion, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(BclBuildNumber, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(BclQfeNumber, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(VMMajorVersion, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(VMMinorVersion, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(VMBuildNumber, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(VMQfeNumber, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(StartupFlags, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(StartupMode, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(CommandLine, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(*ComObjectGuid, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(RuntimeDllPath, buffer, offset, size, fixedBuffer);
if (!success)
{
if (!fixedBuffer)
delete[] buffer;
return ERROR_WRITE_FAULT;
}
do_tracepoint(DotNETRuntime, RuntimeInformationStart, offset, buffer);
if (!fixedBuffer)
delete[] buffer;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledIncreaseMemoryPressure(){ return tracepoint_enabled(DotNETRuntime, IncreaseMemoryPressure); }
extern "C" ULONG FireEtXplatIncreaseMemoryPressure(
const unsigned __int64 BytesAllocated,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledIncreaseMemoryPressure())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
IncreaseMemoryPressure,
BytesAllocated,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledDecreaseMemoryPressure(){ return tracepoint_enabled(DotNETRuntime, DecreaseMemoryPressure); }
extern "C" ULONG FireEtXplatDecreaseMemoryPressure(
const unsigned __int64 BytesFreed,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledDecreaseMemoryPressure())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
DecreaseMemoryPressure,
BytesFreed,
ClrInstanceID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCMarkWithType(){ return tracepoint_enabled(DotNETRuntime, GCMarkWithType); }
extern "C" ULONG FireEtXplatGCMarkWithType(
const unsigned int HeapNum,
const unsigned short ClrInstanceID,
const unsigned int Type,
const unsigned __int64 Bytes)
{
if (!EventXplatEnabledGCMarkWithType())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCMarkWithType,
HeapNum,
ClrInstanceID,
Type,
Bytes);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCJoin_V2(){ return tracepoint_enabled(DotNETRuntime, GCJoin_V2); }
extern "C" ULONG FireEtXplatGCJoin_V2(
const unsigned int Heap,
const unsigned int JoinTime,
const unsigned int JoinType,
const unsigned short ClrInstanceID,
const unsigned int JoinID)
{
if (!EventXplatEnabledGCJoin_V2())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCJoin_V2,
Heap,
JoinTime,
JoinType,
ClrInstanceID,
JoinID);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCPerHeapHistory_V3(){ return tracepoint_enabled(DotNETRuntime, GCPerHeapHistory_V3); }
extern "C" ULONG FireEtXplatGCPerHeapHistory_V3(
const unsigned short ClrInstanceID,
const void* FreeListAllocated,
const void* FreeListRejected,
const void* EndOfSegAllocated,
const void* CondemnedAllocated,
const void* PinnedAllocated,
const void* PinnedAllocatedAdvance,
const unsigned int RunningFreeListEfficiency,
const unsigned int CondemnReasons0,
const unsigned int CondemnReasons1,
const unsigned int CompactMechanisms,
const unsigned int ExpandMechanisms,
const unsigned int HeapIndex,
const void* ExtraGen0Commit,
const unsigned int Count,
int Values_ElementSize,
const void* Values)
{
if (!EventXplatEnabledGCPerHeapHistory_V3())
return ERROR_SUCCESS;
char stackBuffer[118];
char *buffer = stackBuffer;
int offset = 0;
int size = 118;
bool fixedBuffer = true;
bool success = true;
success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(FreeListAllocated, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(FreeListRejected, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(EndOfSegAllocated, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(CondemnedAllocated, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(PinnedAllocated, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(PinnedAllocatedAdvance, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(RunningFreeListEfficiency, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(CondemnReasons0, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(CondemnReasons1, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(CompactMechanisms, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ExpandMechanisms, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(HeapIndex, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ExtraGen0Commit, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer((const BYTE *)Values, (int)Values_ElementSize * (int)Count, buffer, offset, size, fixedBuffer);
if (!success)
{
if (!fixedBuffer)
delete[] buffer;
return ERROR_WRITE_FAULT;
}
do_tracepoint(DotNETRuntime, GCPerHeapHistory_V3, offset, buffer);
if (!fixedBuffer)
delete[] buffer;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledGCGlobalHeapHistory_V2(){ return tracepoint_enabled(DotNETRuntime, GCGlobalHeapHistory_V2); }
extern "C" ULONG FireEtXplatGCGlobalHeapHistory_V2(
const unsigned __int64 FinalYoungestDesired,
const signed int NumHeaps,
const unsigned int CondemnedGeneration,
const unsigned int Gen0ReductionCount,
const unsigned int Reason,
const unsigned int GlobalMechanisms,
const unsigned short ClrInstanceID,
const unsigned int PauseMode,
const unsigned int MemoryPressure)
{
if (!EventXplatEnabledGCGlobalHeapHistory_V2())
return ERROR_SUCCESS;
do_tracepoint(DotNETRuntime,
GCGlobalHeapHistory_V2,
FinalYoungestDesired,
NumHeaps,
CondemnedGeneration,
Gen0ReductionCount,
Reason,
GlobalMechanisms,
ClrInstanceID,
PauseMode,
MemoryPressure);
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledDebugIPCEventStart(){ return tracepoint_enabled(DotNETRuntime, DebugIPCEventStart); }
extern "C" ULONG FireEtXplatDebugIPCEventStart(
)
{
if (!EventXplatEnabledDebugIPCEventStart())
return ERROR_SUCCESS;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledDebugIPCEventEnd(){ return tracepoint_enabled(DotNETRuntime, DebugIPCEventEnd); }
extern "C" ULONG FireEtXplatDebugIPCEventEnd(
)
{
if (!EventXplatEnabledDebugIPCEventEnd())
return ERROR_SUCCESS;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledDebugExceptionProcessingStart(){ return tracepoint_enabled(DotNETRuntime, DebugExceptionProcessingStart); }
extern "C" ULONG FireEtXplatDebugExceptionProcessingStart(
)
{
if (!EventXplatEnabledDebugExceptionProcessingStart())
return ERROR_SUCCESS;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledDebugExceptionProcessingEnd(){ return tracepoint_enabled(DotNETRuntime, DebugExceptionProcessingEnd); }
extern "C" ULONG FireEtXplatDebugExceptionProcessingEnd(
)
{
if (!EventXplatEnabledDebugExceptionProcessingEnd())
return ERROR_SUCCESS;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledCodeSymbols(){ return tracepoint_enabled(DotNETRuntime, CodeSymbols); }
extern "C" ULONG FireEtXplatCodeSymbols(
const unsigned __int64 ModuleId,
const unsigned short TotalChunks,
const unsigned short ChunkNumber,
const unsigned int ChunkLength,
const BYTE* Chunk,
const unsigned short ClrInstanceID)
{
if (!EventXplatEnabledCodeSymbols())
return ERROR_SUCCESS;
char stackBuffer[32];
char *buffer = stackBuffer;
int offset = 0;
int size = 32;
bool fixedBuffer = true;
bool success = true;
success &= WriteToBuffer(ModuleId, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(TotalChunks, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ChunkNumber, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ChunkLength, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer((const BYTE *)Chunk, sizeof(const BYTE) * (int)ChunkLength, buffer, offset, size, fixedBuffer);
success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer);
if (!success)
{
if (!fixedBuffer)
delete[] buffer;
return ERROR_WRITE_FAULT;
}
do_tracepoint(DotNETRuntime, CodeSymbols, offset, buffer);
if (!fixedBuffer)
delete[] buffer;
return ERROR_SUCCESS;
}
extern "C" BOOL EventXplatEnabledEventSource(){ return tracepoint_enabled(DotNETRuntime, EventSource); }
extern "C" ULONG FireEtXplatEventSource(
const signed int EventID,
PCWSTR EventName,
PCWSTR EventSourceName,
PCWSTR Payload)
{
if (!EventXplatEnabledEventSource())
return ERROR_SUCCESS;
INT EventName_path_size = -1;
PathCharString EventName_PS;
INT EventName_full_name_path_size = (PAL_wcslen(EventName) + 1)*sizeof(WCHAR);
CHAR* EventName_full_name = EventName_PS.OpenStringBuffer(EventName_full_name_path_size );
if (EventName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT EventSourceName_path_size = -1;
PathCharString EventSourceName_PS;
INT EventSourceName_full_name_path_size = (PAL_wcslen(EventSourceName) + 1)*sizeof(WCHAR);
CHAR* EventSourceName_full_name = EventSourceName_PS.OpenStringBuffer(EventSourceName_full_name_path_size );
if (EventSourceName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT Payload_path_size = -1;
PathCharString Payload_PS;
INT Payload_full_name_path_size = (PAL_wcslen(Payload) + 1)*sizeof(WCHAR);
CHAR* Payload_full_name = Payload_PS.OpenStringBuffer(Payload_full_name_path_size );
if (Payload_full_name == NULL ) { return ERROR_WRITE_FAULT; }
EventName_path_size = WideCharToMultiByte( CP_ACP, 0, EventName, -1, EventName_full_name, EventName_full_name_path_size, NULL, NULL );
_ASSERTE(EventName_path_size < EventName_full_name_path_size );
EventName_PS.CloseBuffer(EventName_path_size );
if( EventName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
EventSourceName_path_size = WideCharToMultiByte( CP_ACP, 0, EventSourceName, -1, EventSourceName_full_name, EventSourceName_full_name_path_size, NULL, NULL );
_ASSERTE(EventSourceName_path_size < EventSourceName_full_name_path_size );
EventSourceName_PS.CloseBuffer(EventSourceName_path_size );
if( EventSourceName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
Payload_path_size = WideCharToMultiByte( CP_ACP, 0, Payload, -1, Payload_full_name, Payload_full_name_path_size, NULL, NULL );
_ASSERTE(Payload_path_size < Payload_full_name_path_size );
Payload_PS.CloseBuffer(Payload_path_size );
if( Payload_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
do_tracepoint(DotNETRuntime,
EventSource,
EventID,
EventName_full_name,
EventSourceName_full_name,
Payload_full_name);
return ERROR_SUCCESS;
}
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
/******************************************************************
DO NOT MODIFY. AUTOGENERATED FILE.
This file is generated using the logic from <root>/src/scripts/genXplatLttng.py
******************************************************************/
#define TRACEPOINT_DEFINE
#define TRACEPOINT_PROBE_DYNAMIC_LINKAGE
#include "stdlib.h"
#include "pal_mstypes.h"
#include "pal_error.h"
#include "pal.h"
#define PAL_free free
#define PAL_realloc realloc
#include "pal/stackstring.hpp"
#include "tpdotnetruntime.h"
extern "C" BOOL EventXplatEnabledGCStart(){ return TRUE;}
extern "C" ULONG FireEtXplatGCStart(
const unsigned int Count,
const unsigned int Reason
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCStart()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCStart,
Count,
Reason
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCStart_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatGCStart_V1(
const unsigned int Count,
const unsigned int Depth,
const unsigned int Reason,
const unsigned int Type,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCStart_V1()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCStart_V1,
Count,
Depth,
Reason,
Type,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCStart_V2(){ return TRUE;}
extern "C" ULONG FireEtXplatGCStart_V2(
const unsigned int Count,
const unsigned int Depth,
const unsigned int Reason,
const unsigned int Type,
const unsigned short ClrInstanceID,
const unsigned __int64 ClientSequenceNumber
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCStart_V2()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCStart_V2,
Count,
Depth,
Reason,
Type,
ClrInstanceID,
ClientSequenceNumber
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCEnd(){ return TRUE;}
extern "C" ULONG FireEtXplatGCEnd(
const unsigned int Count,
const unsigned short Depth
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCEnd()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCEnd,
Count,
Depth
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCEnd_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatGCEnd_V1(
const unsigned int Count,
const unsigned int Depth,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCEnd_V1()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCEnd_V1,
Count,
Depth,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCRestartEEEnd(){ return TRUE;}
extern "C" ULONG FireEtXplatGCRestartEEEnd(
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCRestartEEEnd()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCRestartEEEnd
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCRestartEEEnd_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatGCRestartEEEnd_V1(
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCRestartEEEnd_V1()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCRestartEEEnd_V1,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCHeapStats(){ return TRUE;}
extern "C" ULONG FireEtXplatGCHeapStats(
const unsigned __int64 GenerationSize0,
const unsigned __int64 TotalPromotedSize0,
const unsigned __int64 GenerationSize1,
const unsigned __int64 TotalPromotedSize1,
const unsigned __int64 GenerationSize2,
const unsigned __int64 TotalPromotedSize2,
const unsigned __int64 GenerationSize3,
const unsigned __int64 TotalPromotedSize3,
const unsigned __int64 FinalizationPromotedSize,
const unsigned __int64 FinalizationPromotedCount,
const unsigned int PinnedObjectCount,
const unsigned int SinkBlockCount,
const unsigned int GCHandleCount
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCHeapStats()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCHeapStats,
GenerationSize0,
TotalPromotedSize0,
GenerationSize1,
TotalPromotedSize1,
GenerationSize2,
TotalPromotedSize2,
GenerationSize3,
TotalPromotedSize3,
FinalizationPromotedSize,
FinalizationPromotedCount
);
tracepoint(
DotNETRuntime,
GCHeapStats_1,
PinnedObjectCount,
SinkBlockCount,
GCHandleCount
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCHeapStats_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatGCHeapStats_V1(
const unsigned __int64 GenerationSize0,
const unsigned __int64 TotalPromotedSize0,
const unsigned __int64 GenerationSize1,
const unsigned __int64 TotalPromotedSize1,
const unsigned __int64 GenerationSize2,
const unsigned __int64 TotalPromotedSize2,
const unsigned __int64 GenerationSize3,
const unsigned __int64 TotalPromotedSize3,
const unsigned __int64 FinalizationPromotedSize,
const unsigned __int64 FinalizationPromotedCount,
const unsigned int PinnedObjectCount,
const unsigned int SinkBlockCount,
const unsigned int GCHandleCount,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCHeapStats_V1()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCHeapStats_V1,
GenerationSize0,
TotalPromotedSize0,
GenerationSize1,
TotalPromotedSize1,
GenerationSize2,
TotalPromotedSize2,
GenerationSize3,
TotalPromotedSize3,
FinalizationPromotedSize,
FinalizationPromotedCount
);
tracepoint(
DotNETRuntime,
GCHeapStats_V1_1,
PinnedObjectCount,
SinkBlockCount,
GCHandleCount,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCCreateSegment(){ return TRUE;}
extern "C" ULONG FireEtXplatGCCreateSegment(
const unsigned __int64 Address,
const unsigned __int64 Size,
const unsigned int Type
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCCreateSegment()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCCreateSegment,
Address,
Size,
Type
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCCreateSegment_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatGCCreateSegment_V1(
const unsigned __int64 Address,
const unsigned __int64 Size,
const unsigned int Type,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCCreateSegment_V1()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCCreateSegment_V1,
Address,
Size,
Type,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCFreeSegment(){ return TRUE;}
extern "C" ULONG FireEtXplatGCFreeSegment(
const unsigned __int64 Address
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCFreeSegment()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCFreeSegment,
Address
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCFreeSegment_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatGCFreeSegment_V1(
const unsigned __int64 Address,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCFreeSegment_V1()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCFreeSegment_V1,
Address,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCRestartEEBegin(){ return TRUE;}
extern "C" ULONG FireEtXplatGCRestartEEBegin(
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCRestartEEBegin()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCRestartEEBegin
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCRestartEEBegin_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatGCRestartEEBegin_V1(
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCRestartEEBegin_V1()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCRestartEEBegin_V1,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCSuspendEEEnd(){ return TRUE;}
extern "C" ULONG FireEtXplatGCSuspendEEEnd(
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCSuspendEEEnd()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCSuspendEEEnd
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCSuspendEEEnd_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatGCSuspendEEEnd_V1(
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCSuspendEEEnd_V1()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCSuspendEEEnd_V1,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCSuspendEEBegin(){ return TRUE;}
extern "C" ULONG FireEtXplatGCSuspendEEBegin(
const unsigned short Reason
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCSuspendEEBegin()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCSuspendEEBegin,
Reason
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCSuspendEEBegin_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatGCSuspendEEBegin_V1(
const unsigned int Reason,
const unsigned int Count,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCSuspendEEBegin_V1()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCSuspendEEBegin_V1,
Reason,
Count,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCAllocationTick(){ return TRUE;}
extern "C" ULONG FireEtXplatGCAllocationTick(
const unsigned int AllocationAmount,
const unsigned int AllocationKind
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCAllocationTick()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCAllocationTick,
AllocationAmount,
AllocationKind
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCAllocationTick_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatGCAllocationTick_V1(
const unsigned int AllocationAmount,
const unsigned int AllocationKind,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCAllocationTick_V1()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCAllocationTick_V1,
AllocationAmount,
AllocationKind,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCAllocationTick_V2(){ return TRUE;}
extern "C" ULONG FireEtXplatGCAllocationTick_V2(
const unsigned int AllocationAmount,
const unsigned int AllocationKind,
const unsigned short ClrInstanceID,
const unsigned __int64 AllocationAmount64,
const void* TypeID,
PCWSTR TypeName,
const unsigned int HeapIndex
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCAllocationTick_V2()){ return ERROR_SUCCESS;}
INT TypeName_path_size = -1;
PathCharString TypeName_PS;
INT TypeName_full_name_path_size = (PAL_wcslen(TypeName) + 1)*sizeof(WCHAR);
CHAR* TypeName_full_name = TypeName_PS.OpenStringBuffer(TypeName_full_name_path_size );
if (TypeName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
TypeName_path_size = WideCharToMultiByte( CP_ACP, 0, TypeName, -1, TypeName_full_name, TypeName_full_name_path_size, NULL, NULL );
_ASSERTE(TypeName_path_size < TypeName_full_name_path_size );
TypeName_PS.CloseBuffer(TypeName_path_size );
if( TypeName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
GCAllocationTick_V2,
AllocationAmount,
AllocationKind,
ClrInstanceID,
AllocationAmount64,
(const size_t) TypeID,
TypeName_full_name,
HeapIndex
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCAllocationTick_V3(){ return TRUE;}
extern "C" ULONG FireEtXplatGCAllocationTick_V3(
const unsigned int AllocationAmount,
const unsigned int AllocationKind,
const unsigned short ClrInstanceID,
const unsigned __int64 AllocationAmount64,
const void* TypeID,
PCWSTR TypeName,
const unsigned int HeapIndex,
const void* Address
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCAllocationTick_V3()){ return ERROR_SUCCESS;}
INT TypeName_path_size = -1;
PathCharString TypeName_PS;
INT TypeName_full_name_path_size = (PAL_wcslen(TypeName) + 1)*sizeof(WCHAR);
CHAR* TypeName_full_name = TypeName_PS.OpenStringBuffer(TypeName_full_name_path_size );
if (TypeName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
TypeName_path_size = WideCharToMultiByte( CP_ACP, 0, TypeName, -1, TypeName_full_name, TypeName_full_name_path_size, NULL, NULL );
_ASSERTE(TypeName_path_size < TypeName_full_name_path_size );
TypeName_PS.CloseBuffer(TypeName_path_size );
if( TypeName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
GCAllocationTick_V3,
AllocationAmount,
AllocationKind,
ClrInstanceID,
AllocationAmount64,
(const size_t) TypeID,
TypeName_full_name,
HeapIndex,
(const size_t) Address
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCCreateConcurrentThread(){ return TRUE;}
extern "C" ULONG FireEtXplatGCCreateConcurrentThread(
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCCreateConcurrentThread()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCCreateConcurrentThread
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCCreateConcurrentThread_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatGCCreateConcurrentThread_V1(
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCCreateConcurrentThread_V1()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCCreateConcurrentThread_V1,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCTerminateConcurrentThread(){ return TRUE;}
extern "C" ULONG FireEtXplatGCTerminateConcurrentThread(
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCTerminateConcurrentThread()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCTerminateConcurrentThread
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCTerminateConcurrentThread_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatGCTerminateConcurrentThread_V1(
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCTerminateConcurrentThread_V1()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCTerminateConcurrentThread_V1,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCFinalizersEnd(){ return TRUE;}
extern "C" ULONG FireEtXplatGCFinalizersEnd(
const unsigned int Count
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCFinalizersEnd()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCFinalizersEnd,
Count
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCFinalizersEnd_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatGCFinalizersEnd_V1(
const unsigned int Count,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCFinalizersEnd_V1()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCFinalizersEnd_V1,
Count,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCFinalizersBegin(){ return TRUE;}
extern "C" ULONG FireEtXplatGCFinalizersBegin(
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCFinalizersBegin()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCFinalizersBegin
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCFinalizersBegin_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatGCFinalizersBegin_V1(
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCFinalizersBegin_V1()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCFinalizersBegin_V1,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledBulkType(){ return TRUE;}
extern "C" ULONG FireEtXplatBulkType(
const unsigned int Count,
const unsigned short ClrInstanceID,
const ULONG Arg0_Struct_Len_,
const void* Arg0_Struct_Pointer_
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledBulkType()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
BulkType,
Count,
ClrInstanceID,
Arg0_Struct_Len_,
(const int*) Arg0_Struct_Pointer_
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCBulkRootEdge(){ return TRUE;}
extern "C" ULONG FireEtXplatGCBulkRootEdge(
const unsigned int Index,
const unsigned int Count,
const unsigned short ClrInstanceID,
const ULONG Arg0_Struct_Len_,
const void* Arg0_Struct_Pointer_
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCBulkRootEdge()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCBulkRootEdge,
Index,
Count,
ClrInstanceID,
Arg0_Struct_Len_,
(const int*) Arg0_Struct_Pointer_
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCBulkRootConditionalWeakTableElementEdge(){ return TRUE;}
extern "C" ULONG FireEtXplatGCBulkRootConditionalWeakTableElementEdge(
const unsigned int Index,
const unsigned int Count,
const unsigned short ClrInstanceID,
const ULONG Arg0_Struct_Len_,
const void* Arg0_Struct_Pointer_
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCBulkRootConditionalWeakTableElementEdge()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCBulkRootConditionalWeakTableElementEdge,
Index,
Count,
ClrInstanceID,
Arg0_Struct_Len_,
(const int*) Arg0_Struct_Pointer_
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCBulkNode(){ return TRUE;}
extern "C" ULONG FireEtXplatGCBulkNode(
const unsigned int Index,
const unsigned int Count,
const unsigned short ClrInstanceID,
const ULONG Arg0_Struct_Len_,
const void* Arg0_Struct_Pointer_
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCBulkNode()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCBulkNode,
Index,
Count,
ClrInstanceID,
Arg0_Struct_Len_,
(const int*) Arg0_Struct_Pointer_
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCBulkEdge(){ return TRUE;}
extern "C" ULONG FireEtXplatGCBulkEdge(
const unsigned int Index,
const unsigned int Count,
const unsigned short ClrInstanceID,
const ULONG Arg0_Struct_Len_,
const void* Arg0_Struct_Pointer_
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCBulkEdge()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCBulkEdge,
Index,
Count,
ClrInstanceID,
Arg0_Struct_Len_,
(const int*) Arg0_Struct_Pointer_
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCSampledObjectAllocationHigh(){ return TRUE;}
extern "C" ULONG FireEtXplatGCSampledObjectAllocationHigh(
const void* Address,
const void* TypeID,
const unsigned int ObjectCountForTypeSample,
const unsigned __int64 TotalSizeForTypeSample,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCSampledObjectAllocationHigh()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCSampledObjectAllocationHigh,
(const size_t) Address,
(const size_t) TypeID,
ObjectCountForTypeSample,
TotalSizeForTypeSample,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCBulkSurvivingObjectRanges(){ return TRUE;}
extern "C" ULONG FireEtXplatGCBulkSurvivingObjectRanges(
const unsigned int Index,
const unsigned int Count,
const unsigned short ClrInstanceID,
const ULONG Arg0_Struct_Len_,
const void* Arg0_Struct_Pointer_
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCBulkSurvivingObjectRanges()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCBulkSurvivingObjectRanges,
Index,
Count,
ClrInstanceID,
Arg0_Struct_Len_,
(const int*) Arg0_Struct_Pointer_
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCBulkMovedObjectRanges(){ return TRUE;}
extern "C" ULONG FireEtXplatGCBulkMovedObjectRanges(
const unsigned int Index,
const unsigned int Count,
const unsigned short ClrInstanceID,
const ULONG Arg0_Struct_Len_,
const void* Arg0_Struct_Pointer_
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCBulkMovedObjectRanges()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCBulkMovedObjectRanges,
Index,
Count,
ClrInstanceID,
Arg0_Struct_Len_,
(const int*) Arg0_Struct_Pointer_
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCGenerationRange(){ return TRUE;}
extern "C" ULONG FireEtXplatGCGenerationRange(
const unsigned char Generation,
const void* RangeStart,
const unsigned __int64 RangeUsedLength,
const unsigned __int64 RangeReservedLength,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCGenerationRange()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCGenerationRange,
Generation,
(const size_t) RangeStart,
RangeUsedLength,
RangeReservedLength,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCMarkStackRoots(){ return TRUE;}
extern "C" ULONG FireEtXplatGCMarkStackRoots(
const unsigned int HeapNum,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCMarkStackRoots()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCMarkStackRoots,
HeapNum,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCMarkFinalizeQueueRoots(){ return TRUE;}
extern "C" ULONG FireEtXplatGCMarkFinalizeQueueRoots(
const unsigned int HeapNum,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCMarkFinalizeQueueRoots()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCMarkFinalizeQueueRoots,
HeapNum,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCMarkHandles(){ return TRUE;}
extern "C" ULONG FireEtXplatGCMarkHandles(
const unsigned int HeapNum,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCMarkHandles()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCMarkHandles,
HeapNum,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCMarkOlderGenerationRoots(){ return TRUE;}
extern "C" ULONG FireEtXplatGCMarkOlderGenerationRoots(
const unsigned int HeapNum,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCMarkOlderGenerationRoots()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCMarkOlderGenerationRoots,
HeapNum,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledFinalizeObject(){ return TRUE;}
extern "C" ULONG FireEtXplatFinalizeObject(
const void* TypeID,
const void* ObjectID,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledFinalizeObject()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
FinalizeObject,
(const size_t) TypeID,
(const size_t) ObjectID,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledSetGCHandle(){ return TRUE;}
extern "C" ULONG FireEtXplatSetGCHandle(
const void* HandleID,
const void* ObjectID,
const unsigned int Kind,
const unsigned int Generation,
const unsigned __int64 AppDomainID,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledSetGCHandle()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
SetGCHandle,
(const size_t) HandleID,
(const size_t) ObjectID,
Kind,
Generation,
AppDomainID,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledDestroyGCHandle(){ return TRUE;}
extern "C" ULONG FireEtXplatDestroyGCHandle(
const void* HandleID,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledDestroyGCHandle()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
DestroyGCHandle,
(const size_t) HandleID,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCSampledObjectAllocationLow(){ return TRUE;}
extern "C" ULONG FireEtXplatGCSampledObjectAllocationLow(
const void* Address,
const void* TypeID,
const unsigned int ObjectCountForTypeSample,
const unsigned __int64 TotalSizeForTypeSample,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCSampledObjectAllocationLow()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCSampledObjectAllocationLow,
(const size_t) Address,
(const size_t) TypeID,
ObjectCountForTypeSample,
TotalSizeForTypeSample,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledPinObjectAtGCTime(){ return TRUE;}
extern "C" ULONG FireEtXplatPinObjectAtGCTime(
const void* HandleID,
const void* ObjectID,
const unsigned __int64 ObjectSize,
PCWSTR TypeName,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledPinObjectAtGCTime()){ return ERROR_SUCCESS;}
INT TypeName_path_size = -1;
PathCharString TypeName_PS;
INT TypeName_full_name_path_size = (PAL_wcslen(TypeName) + 1)*sizeof(WCHAR);
CHAR* TypeName_full_name = TypeName_PS.OpenStringBuffer(TypeName_full_name_path_size );
if (TypeName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
TypeName_path_size = WideCharToMultiByte( CP_ACP, 0, TypeName, -1, TypeName_full_name, TypeName_full_name_path_size, NULL, NULL );
_ASSERTE(TypeName_path_size < TypeName_full_name_path_size );
TypeName_PS.CloseBuffer(TypeName_path_size );
if( TypeName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
PinObjectAtGCTime,
(const size_t) HandleID,
(const size_t) ObjectID,
ObjectSize,
TypeName_full_name,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCTriggered(){ return TRUE;}
extern "C" ULONG FireEtXplatGCTriggered(
const unsigned int Reason,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCTriggered()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCTriggered,
Reason,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCBulkRootCCW(){ return TRUE;}
extern "C" ULONG FireEtXplatGCBulkRootCCW(
const unsigned int Count,
const unsigned short ClrInstanceID,
const ULONG Arg0_Struct_Len_,
const void* Arg0_Struct_Pointer_
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCBulkRootCCW()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCBulkRootCCW,
Count,
ClrInstanceID,
Arg0_Struct_Len_,
(const int*) Arg0_Struct_Pointer_
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCBulkRCW(){ return TRUE;}
extern "C" ULONG FireEtXplatGCBulkRCW(
const unsigned int Count,
const unsigned short ClrInstanceID,
const ULONG Arg0_Struct_Len_,
const void* Arg0_Struct_Pointer_
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCBulkRCW()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCBulkRCW,
Count,
ClrInstanceID,
Arg0_Struct_Len_,
(const int*) Arg0_Struct_Pointer_
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCBulkRootStaticVar(){ return TRUE;}
extern "C" ULONG FireEtXplatGCBulkRootStaticVar(
const unsigned int Count,
const unsigned __int64 AppDomainID,
const unsigned short ClrInstanceID,
const ULONG Arg0_Struct_Len_,
const void* Arg0_Struct_Pointer_
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCBulkRootStaticVar()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCBulkRootStaticVar,
Count,
AppDomainID,
ClrInstanceID,
Arg0_Struct_Len_,
(const int*) Arg0_Struct_Pointer_
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledWorkerThreadCreate(){ return TRUE;}
extern "C" ULONG FireEtXplatWorkerThreadCreate(
const unsigned int WorkerThreadCount,
const unsigned int RetiredWorkerThreads
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledWorkerThreadCreate()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
WorkerThreadCreate,
WorkerThreadCount,
RetiredWorkerThreads
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledWorkerThreadTerminate(){ return TRUE;}
extern "C" ULONG FireEtXplatWorkerThreadTerminate(
const unsigned int WorkerThreadCount,
const unsigned int RetiredWorkerThreads
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledWorkerThreadTerminate()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
WorkerThreadTerminate,
WorkerThreadCount,
RetiredWorkerThreads
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledWorkerThreadRetire(){ return TRUE;}
extern "C" ULONG FireEtXplatWorkerThreadRetire(
const unsigned int WorkerThreadCount,
const unsigned int RetiredWorkerThreads
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledWorkerThreadRetire()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
WorkerThreadRetire,
WorkerThreadCount,
RetiredWorkerThreads
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledWorkerThreadUnretire(){ return TRUE;}
extern "C" ULONG FireEtXplatWorkerThreadUnretire(
const unsigned int WorkerThreadCount,
const unsigned int RetiredWorkerThreads
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledWorkerThreadUnretire()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
WorkerThreadUnretire,
WorkerThreadCount,
RetiredWorkerThreads
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledIOThreadCreate(){ return TRUE;}
extern "C" ULONG FireEtXplatIOThreadCreate(
const unsigned int IOThreadCount,
const unsigned int RetiredIOThreads
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledIOThreadCreate()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
IOThreadCreate,
IOThreadCount,
RetiredIOThreads
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledIOThreadCreate_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatIOThreadCreate_V1(
const unsigned int IOThreadCount,
const unsigned int RetiredIOThreads,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledIOThreadCreate_V1()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
IOThreadCreate_V1,
IOThreadCount,
RetiredIOThreads,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledIOThreadTerminate(){ return TRUE;}
extern "C" ULONG FireEtXplatIOThreadTerminate(
const unsigned int IOThreadCount,
const unsigned int RetiredIOThreads
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledIOThreadTerminate()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
IOThreadTerminate,
IOThreadCount,
RetiredIOThreads
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledIOThreadTerminate_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatIOThreadTerminate_V1(
const unsigned int IOThreadCount,
const unsigned int RetiredIOThreads,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledIOThreadTerminate_V1()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
IOThreadTerminate_V1,
IOThreadCount,
RetiredIOThreads,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledIOThreadRetire(){ return TRUE;}
extern "C" ULONG FireEtXplatIOThreadRetire(
const unsigned int IOThreadCount,
const unsigned int RetiredIOThreads
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledIOThreadRetire()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
IOThreadRetire,
IOThreadCount,
RetiredIOThreads
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledIOThreadRetire_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatIOThreadRetire_V1(
const unsigned int IOThreadCount,
const unsigned int RetiredIOThreads,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledIOThreadRetire_V1()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
IOThreadRetire_V1,
IOThreadCount,
RetiredIOThreads,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledIOThreadUnretire(){ return TRUE;}
extern "C" ULONG FireEtXplatIOThreadUnretire(
const unsigned int IOThreadCount,
const unsigned int RetiredIOThreads
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledIOThreadUnretire()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
IOThreadUnretire,
IOThreadCount,
RetiredIOThreads
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledIOThreadUnretire_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatIOThreadUnretire_V1(
const unsigned int IOThreadCount,
const unsigned int RetiredIOThreads,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledIOThreadUnretire_V1()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
IOThreadUnretire_V1,
IOThreadCount,
RetiredIOThreads,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledThreadpoolSuspensionSuspendThread(){ return TRUE;}
extern "C" ULONG FireEtXplatThreadpoolSuspensionSuspendThread(
const unsigned int ClrThreadID,
const unsigned int CpuUtilization
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledThreadpoolSuspensionSuspendThread()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ThreadpoolSuspensionSuspendThread,
ClrThreadID,
CpuUtilization
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledThreadpoolSuspensionResumeThread(){ return TRUE;}
extern "C" ULONG FireEtXplatThreadpoolSuspensionResumeThread(
const unsigned int ClrThreadID,
const unsigned int CpuUtilization
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledThreadpoolSuspensionResumeThread()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ThreadpoolSuspensionResumeThread,
ClrThreadID,
CpuUtilization
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledThreadPoolWorkerThreadStart(){ return TRUE;}
extern "C" ULONG FireEtXplatThreadPoolWorkerThreadStart(
const unsigned int ActiveWorkerThreadCount,
const unsigned int RetiredWorkerThreadCount,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledThreadPoolWorkerThreadStart()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ThreadPoolWorkerThreadStart,
ActiveWorkerThreadCount,
RetiredWorkerThreadCount,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledThreadPoolWorkerThreadStop(){ return TRUE;}
extern "C" ULONG FireEtXplatThreadPoolWorkerThreadStop(
const unsigned int ActiveWorkerThreadCount,
const unsigned int RetiredWorkerThreadCount,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledThreadPoolWorkerThreadStop()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ThreadPoolWorkerThreadStop,
ActiveWorkerThreadCount,
RetiredWorkerThreadCount,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledThreadPoolWorkerThreadRetirementStart(){ return TRUE;}
extern "C" ULONG FireEtXplatThreadPoolWorkerThreadRetirementStart(
const unsigned int ActiveWorkerThreadCount,
const unsigned int RetiredWorkerThreadCount,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledThreadPoolWorkerThreadRetirementStart()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ThreadPoolWorkerThreadRetirementStart,
ActiveWorkerThreadCount,
RetiredWorkerThreadCount,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledThreadPoolWorkerThreadRetirementStop(){ return TRUE;}
extern "C" ULONG FireEtXplatThreadPoolWorkerThreadRetirementStop(
const unsigned int ActiveWorkerThreadCount,
const unsigned int RetiredWorkerThreadCount,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledThreadPoolWorkerThreadRetirementStop()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ThreadPoolWorkerThreadRetirementStop,
ActiveWorkerThreadCount,
RetiredWorkerThreadCount,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledThreadPoolWorkerThreadAdjustmentSample(){ return TRUE;}
extern "C" ULONG FireEtXplatThreadPoolWorkerThreadAdjustmentSample(
const double Throughput,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledThreadPoolWorkerThreadAdjustmentSample()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ThreadPoolWorkerThreadAdjustmentSample,
Throughput,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledThreadPoolWorkerThreadAdjustmentAdjustment(){ return TRUE;}
extern "C" ULONG FireEtXplatThreadPoolWorkerThreadAdjustmentAdjustment(
const double AverageThroughput,
const unsigned int NewWorkerThreadCount,
const unsigned int Reason,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledThreadPoolWorkerThreadAdjustmentAdjustment()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ThreadPoolWorkerThreadAdjustmentAdjustment,
AverageThroughput,
NewWorkerThreadCount,
Reason,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledThreadPoolWorkerThreadAdjustmentStats(){ return TRUE;}
extern "C" ULONG FireEtXplatThreadPoolWorkerThreadAdjustmentStats(
const double Duration,
const double Throughput,
const double ThreadWave,
const double ThroughputWave,
const double ThroughputErrorEstimate,
const double AverageThroughputErrorEstimate,
const double ThroughputRatio,
const double Confidence,
const double NewControlSetting,
const unsigned short NewThreadWaveMagnitude,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledThreadPoolWorkerThreadAdjustmentStats()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ThreadPoolWorkerThreadAdjustmentStats,
Duration,
Throughput,
ThreadWave,
ThroughputWave,
ThroughputErrorEstimate,
AverageThroughputErrorEstimate,
ThroughputRatio,
Confidence,
NewControlSetting,
NewThreadWaveMagnitude
);
tracepoint(
DotNETRuntime,
ThreadPoolWorkerThreadAdjustmentStats_1,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledThreadPoolWorkerThreadWait(){ return TRUE;}
extern "C" ULONG FireEtXplatThreadPoolWorkerThreadWait(
const unsigned int ActiveWorkerThreadCount,
const unsigned int RetiredWorkerThreadCount,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledThreadPoolWorkerThreadWait()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ThreadPoolWorkerThreadWait,
ActiveWorkerThreadCount,
RetiredWorkerThreadCount,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledThreadPoolWorkingThreadCount(){ return TRUE;}
extern "C" ULONG FireEtXplatThreadPoolWorkingThreadCount(
const unsigned int Count,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledThreadPoolWorkingThreadCount()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ThreadPoolWorkingThreadCount,
Count,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledThreadPoolEnqueue(){ return TRUE;}
extern "C" ULONG FireEtXplatThreadPoolEnqueue(
const void* WorkID,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledThreadPoolEnqueue()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ThreadPoolEnqueue,
(const size_t) WorkID,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledThreadPoolDequeue(){ return TRUE;}
extern "C" ULONG FireEtXplatThreadPoolDequeue(
const void* WorkID,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledThreadPoolDequeue()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ThreadPoolDequeue,
(const size_t) WorkID,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledThreadPoolIOEnqueue(){ return TRUE;}
extern "C" ULONG FireEtXplatThreadPoolIOEnqueue(
const void* NativeOverlapped,
const void* Overlapped,
const BOOL MultiDequeues,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledThreadPoolIOEnqueue()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ThreadPoolIOEnqueue,
(const size_t) NativeOverlapped,
(const size_t) Overlapped,
MultiDequeues,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledThreadPoolIODequeue(){ return TRUE;}
extern "C" ULONG FireEtXplatThreadPoolIODequeue(
const void* NativeOverlapped,
const void* Overlapped,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledThreadPoolIODequeue()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ThreadPoolIODequeue,
(const size_t) NativeOverlapped,
(const size_t) Overlapped,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledThreadPoolIOPack(){ return TRUE;}
extern "C" ULONG FireEtXplatThreadPoolIOPack(
const void* NativeOverlapped,
const void* Overlapped,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledThreadPoolIOPack()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ThreadPoolIOPack,
(const size_t) NativeOverlapped,
(const size_t) Overlapped,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledThreadCreating(){ return TRUE;}
extern "C" ULONG FireEtXplatThreadCreating(
const void* ID,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledThreadCreating()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ThreadCreating,
(const size_t) ID,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledThreadRunning(){ return TRUE;}
extern "C" ULONG FireEtXplatThreadRunning(
const void* ID,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledThreadRunning()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ThreadRunning,
(const size_t) ID,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledExceptionThrown(){ return TRUE;}
extern "C" ULONG FireEtXplatExceptionThrown(
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledExceptionThrown()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ExceptionThrown
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledExceptionThrown_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatExceptionThrown_V1(
PCWSTR ExceptionType,
PCWSTR ExceptionMessage,
const void* ExceptionEIP,
const unsigned int ExceptionHRESULT,
const unsigned short ExceptionFlags,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledExceptionThrown_V1()){ return ERROR_SUCCESS;}
INT ExceptionType_path_size = -1;
PathCharString ExceptionType_PS;
INT ExceptionType_full_name_path_size = (PAL_wcslen(ExceptionType) + 1)*sizeof(WCHAR);
CHAR* ExceptionType_full_name = ExceptionType_PS.OpenStringBuffer(ExceptionType_full_name_path_size );
if (ExceptionType_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT ExceptionMessage_path_size = -1;
PathCharString ExceptionMessage_PS;
INT ExceptionMessage_full_name_path_size = (PAL_wcslen(ExceptionMessage) + 1)*sizeof(WCHAR);
CHAR* ExceptionMessage_full_name = ExceptionMessage_PS.OpenStringBuffer(ExceptionMessage_full_name_path_size );
if (ExceptionMessage_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ExceptionType_path_size = WideCharToMultiByte( CP_ACP, 0, ExceptionType, -1, ExceptionType_full_name, ExceptionType_full_name_path_size, NULL, NULL );
_ASSERTE(ExceptionType_path_size < ExceptionType_full_name_path_size );
ExceptionType_PS.CloseBuffer(ExceptionType_path_size );
if( ExceptionType_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
ExceptionMessage_path_size = WideCharToMultiByte( CP_ACP, 0, ExceptionMessage, -1, ExceptionMessage_full_name, ExceptionMessage_full_name_path_size, NULL, NULL );
_ASSERTE(ExceptionMessage_path_size < ExceptionMessage_full_name_path_size );
ExceptionMessage_PS.CloseBuffer(ExceptionMessage_path_size );
if( ExceptionMessage_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
ExceptionThrown_V1,
ExceptionType_full_name,
ExceptionMessage_full_name,
(const size_t) ExceptionEIP,
ExceptionHRESULT,
ExceptionFlags,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledExceptionCatchStart(){ return TRUE;}
extern "C" ULONG FireEtXplatExceptionCatchStart(
const unsigned __int64 EntryEIP,
const unsigned __int64 MethodID,
PCWSTR MethodName,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledExceptionCatchStart()){ return ERROR_SUCCESS;}
INT MethodName_path_size = -1;
PathCharString MethodName_PS;
INT MethodName_full_name_path_size = (PAL_wcslen(MethodName) + 1)*sizeof(WCHAR);
CHAR* MethodName_full_name = MethodName_PS.OpenStringBuffer(MethodName_full_name_path_size );
if (MethodName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
MethodName_path_size = WideCharToMultiByte( CP_ACP, 0, MethodName, -1, MethodName_full_name, MethodName_full_name_path_size, NULL, NULL );
_ASSERTE(MethodName_path_size < MethodName_full_name_path_size );
MethodName_PS.CloseBuffer(MethodName_path_size );
if( MethodName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
ExceptionCatchStart,
EntryEIP,
MethodID,
MethodName_full_name,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledExceptionCatchStop(){ return TRUE;}
extern "C" ULONG FireEtXplatExceptionCatchStop(
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledExceptionCatchStop()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ExceptionCatchStop
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledExceptionFinallyStart(){ return TRUE;}
extern "C" ULONG FireEtXplatExceptionFinallyStart(
const unsigned __int64 EntryEIP,
const unsigned __int64 MethodID,
PCWSTR MethodName,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledExceptionFinallyStart()){ return ERROR_SUCCESS;}
INT MethodName_path_size = -1;
PathCharString MethodName_PS;
INT MethodName_full_name_path_size = (PAL_wcslen(MethodName) + 1)*sizeof(WCHAR);
CHAR* MethodName_full_name = MethodName_PS.OpenStringBuffer(MethodName_full_name_path_size );
if (MethodName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
MethodName_path_size = WideCharToMultiByte( CP_ACP, 0, MethodName, -1, MethodName_full_name, MethodName_full_name_path_size, NULL, NULL );
_ASSERTE(MethodName_path_size < MethodName_full_name_path_size );
MethodName_PS.CloseBuffer(MethodName_path_size );
if( MethodName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
ExceptionFinallyStart,
EntryEIP,
MethodID,
MethodName_full_name,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledExceptionFinallyStop(){ return TRUE;}
extern "C" ULONG FireEtXplatExceptionFinallyStop(
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledExceptionFinallyStop()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ExceptionFinallyStop
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledExceptionFilterStart(){ return TRUE;}
extern "C" ULONG FireEtXplatExceptionFilterStart(
const unsigned __int64 EntryEIP,
const unsigned __int64 MethodID,
PCWSTR MethodName,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledExceptionFilterStart()){ return ERROR_SUCCESS;}
INT MethodName_path_size = -1;
PathCharString MethodName_PS;
INT MethodName_full_name_path_size = (PAL_wcslen(MethodName) + 1)*sizeof(WCHAR);
CHAR* MethodName_full_name = MethodName_PS.OpenStringBuffer(MethodName_full_name_path_size );
if (MethodName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
MethodName_path_size = WideCharToMultiByte( CP_ACP, 0, MethodName, -1, MethodName_full_name, MethodName_full_name_path_size, NULL, NULL );
_ASSERTE(MethodName_path_size < MethodName_full_name_path_size );
MethodName_PS.CloseBuffer(MethodName_path_size );
if( MethodName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
ExceptionFilterStart,
EntryEIP,
MethodID,
MethodName_full_name,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledExceptionFilterStop(){ return TRUE;}
extern "C" ULONG FireEtXplatExceptionFilterStop(
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledExceptionFilterStop()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ExceptionFilterStop
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledExceptionThrownStop(){ return TRUE;}
extern "C" ULONG FireEtXplatExceptionThrownStop(
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledExceptionThrownStop()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ExceptionThrownStop
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledContention(){ return TRUE;}
extern "C" ULONG FireEtXplatContention(
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledContention()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
Contention
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledContentionStart_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatContentionStart_V1(
const unsigned char ContentionFlags,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledContentionStart_V1()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ContentionStart_V1,
ContentionFlags,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledContentionStop(){ return TRUE;}
extern "C" ULONG FireEtXplatContentionStop(
const unsigned char ContentionFlags,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledContentionStop()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ContentionStop,
ContentionFlags,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledCLRStackWalk(){ return TRUE;}
extern "C" ULONG FireEtXplatCLRStackWalk(
const unsigned short ClrInstanceID,
const unsigned char Reserved1,
const unsigned char Reserved2,
const unsigned int FrameCount,
const void** Stack
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledCLRStackWalk()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
CLRStackWalk,
ClrInstanceID,
Reserved1,
Reserved2,
FrameCount,
(const size_t*) Stack
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledAppDomainMemAllocated(){ return TRUE;}
extern "C" ULONG FireEtXplatAppDomainMemAllocated(
const unsigned __int64 AppDomainID,
const unsigned __int64 Allocated,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledAppDomainMemAllocated()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
AppDomainMemAllocated,
AppDomainID,
Allocated,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledAppDomainMemSurvived(){ return TRUE;}
extern "C" ULONG FireEtXplatAppDomainMemSurvived(
const unsigned __int64 AppDomainID,
const unsigned __int64 Survived,
const unsigned __int64 ProcessSurvived,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledAppDomainMemSurvived()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
AppDomainMemSurvived,
AppDomainID,
Survived,
ProcessSurvived,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledThreadCreated(){ return TRUE;}
extern "C" ULONG FireEtXplatThreadCreated(
const unsigned __int64 ManagedThreadID,
const unsigned __int64 AppDomainID,
const unsigned int Flags,
const unsigned int ManagedThreadIndex,
const unsigned int OSThreadID,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledThreadCreated()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ThreadCreated,
ManagedThreadID,
AppDomainID,
Flags,
ManagedThreadIndex,
OSThreadID,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledThreadTerminated(){ return TRUE;}
extern "C" ULONG FireEtXplatThreadTerminated(
const unsigned __int64 ManagedThreadID,
const unsigned __int64 AppDomainID,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledThreadTerminated()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ThreadTerminated,
ManagedThreadID,
AppDomainID,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledThreadDomainEnter(){ return TRUE;}
extern "C" ULONG FireEtXplatThreadDomainEnter(
const unsigned __int64 ManagedThreadID,
const unsigned __int64 AppDomainID,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledThreadDomainEnter()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ThreadDomainEnter,
ManagedThreadID,
AppDomainID,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledILStubGenerated(){ return TRUE;}
extern "C" ULONG FireEtXplatILStubGenerated(
const unsigned short ClrInstanceID,
const unsigned __int64 ModuleID,
const unsigned __int64 StubMethodID,
const unsigned int StubFlags,
const unsigned int ManagedInteropMethodToken,
PCWSTR ManagedInteropMethodNamespace,
PCWSTR ManagedInteropMethodName,
PCWSTR ManagedInteropMethodSignature,
PCWSTR NativeMethodSignature,
PCWSTR StubMethodSignature,
PCWSTR StubMethodILCode
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledILStubGenerated()){ return ERROR_SUCCESS;}
INT ManagedInteropMethodNamespace_path_size = -1;
PathCharString ManagedInteropMethodNamespace_PS;
INT ManagedInteropMethodNamespace_full_name_path_size = (PAL_wcslen(ManagedInteropMethodNamespace) + 1)*sizeof(WCHAR);
CHAR* ManagedInteropMethodNamespace_full_name = ManagedInteropMethodNamespace_PS.OpenStringBuffer(ManagedInteropMethodNamespace_full_name_path_size );
if (ManagedInteropMethodNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT ManagedInteropMethodName_path_size = -1;
PathCharString ManagedInteropMethodName_PS;
INT ManagedInteropMethodName_full_name_path_size = (PAL_wcslen(ManagedInteropMethodName) + 1)*sizeof(WCHAR);
CHAR* ManagedInteropMethodName_full_name = ManagedInteropMethodName_PS.OpenStringBuffer(ManagedInteropMethodName_full_name_path_size );
if (ManagedInteropMethodName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT ManagedInteropMethodSignature_path_size = -1;
PathCharString ManagedInteropMethodSignature_PS;
INT ManagedInteropMethodSignature_full_name_path_size = (PAL_wcslen(ManagedInteropMethodSignature) + 1)*sizeof(WCHAR);
CHAR* ManagedInteropMethodSignature_full_name = ManagedInteropMethodSignature_PS.OpenStringBuffer(ManagedInteropMethodSignature_full_name_path_size );
if (ManagedInteropMethodSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT NativeMethodSignature_path_size = -1;
PathCharString NativeMethodSignature_PS;
INT NativeMethodSignature_full_name_path_size = (PAL_wcslen(NativeMethodSignature) + 1)*sizeof(WCHAR);
CHAR* NativeMethodSignature_full_name = NativeMethodSignature_PS.OpenStringBuffer(NativeMethodSignature_full_name_path_size );
if (NativeMethodSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT StubMethodSignature_path_size = -1;
PathCharString StubMethodSignature_PS;
INT StubMethodSignature_full_name_path_size = (PAL_wcslen(StubMethodSignature) + 1)*sizeof(WCHAR);
CHAR* StubMethodSignature_full_name = StubMethodSignature_PS.OpenStringBuffer(StubMethodSignature_full_name_path_size );
if (StubMethodSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT StubMethodILCode_path_size = -1;
PathCharString StubMethodILCode_PS;
INT StubMethodILCode_full_name_path_size = (PAL_wcslen(StubMethodILCode) + 1)*sizeof(WCHAR);
CHAR* StubMethodILCode_full_name = StubMethodILCode_PS.OpenStringBuffer(StubMethodILCode_full_name_path_size );
if (StubMethodILCode_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ManagedInteropMethodNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, ManagedInteropMethodNamespace, -1, ManagedInteropMethodNamespace_full_name, ManagedInteropMethodNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(ManagedInteropMethodNamespace_path_size < ManagedInteropMethodNamespace_full_name_path_size );
ManagedInteropMethodNamespace_PS.CloseBuffer(ManagedInteropMethodNamespace_path_size );
if( ManagedInteropMethodNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
ManagedInteropMethodName_path_size = WideCharToMultiByte( CP_ACP, 0, ManagedInteropMethodName, -1, ManagedInteropMethodName_full_name, ManagedInteropMethodName_full_name_path_size, NULL, NULL );
_ASSERTE(ManagedInteropMethodName_path_size < ManagedInteropMethodName_full_name_path_size );
ManagedInteropMethodName_PS.CloseBuffer(ManagedInteropMethodName_path_size );
if( ManagedInteropMethodName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
ManagedInteropMethodSignature_path_size = WideCharToMultiByte( CP_ACP, 0, ManagedInteropMethodSignature, -1, ManagedInteropMethodSignature_full_name, ManagedInteropMethodSignature_full_name_path_size, NULL, NULL );
_ASSERTE(ManagedInteropMethodSignature_path_size < ManagedInteropMethodSignature_full_name_path_size );
ManagedInteropMethodSignature_PS.CloseBuffer(ManagedInteropMethodSignature_path_size );
if( ManagedInteropMethodSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
NativeMethodSignature_path_size = WideCharToMultiByte( CP_ACP, 0, NativeMethodSignature, -1, NativeMethodSignature_full_name, NativeMethodSignature_full_name_path_size, NULL, NULL );
_ASSERTE(NativeMethodSignature_path_size < NativeMethodSignature_full_name_path_size );
NativeMethodSignature_PS.CloseBuffer(NativeMethodSignature_path_size );
if( NativeMethodSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
StubMethodSignature_path_size = WideCharToMultiByte( CP_ACP, 0, StubMethodSignature, -1, StubMethodSignature_full_name, StubMethodSignature_full_name_path_size, NULL, NULL );
_ASSERTE(StubMethodSignature_path_size < StubMethodSignature_full_name_path_size );
StubMethodSignature_PS.CloseBuffer(StubMethodSignature_path_size );
if( StubMethodSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
StubMethodILCode_path_size = WideCharToMultiByte( CP_ACP, 0, StubMethodILCode, -1, StubMethodILCode_full_name, StubMethodILCode_full_name_path_size, NULL, NULL );
_ASSERTE(StubMethodILCode_path_size < StubMethodILCode_full_name_path_size );
StubMethodILCode_PS.CloseBuffer(StubMethodILCode_path_size );
if( StubMethodILCode_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
ILStubGenerated,
ClrInstanceID,
ModuleID,
StubMethodID,
StubFlags,
ManagedInteropMethodToken,
ManagedInteropMethodNamespace_full_name,
ManagedInteropMethodName_full_name,
ManagedInteropMethodSignature_full_name,
NativeMethodSignature_full_name,
StubMethodSignature_full_name
);
tracepoint(
DotNETRuntime,
ILStubGenerated_1,
StubMethodILCode_full_name
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledILStubCacheHit(){ return TRUE;}
extern "C" ULONG FireEtXplatILStubCacheHit(
const unsigned short ClrInstanceID,
const unsigned __int64 ModuleID,
const unsigned __int64 StubMethodID,
const unsigned int ManagedInteropMethodToken,
PCWSTR ManagedInteropMethodNamespace,
PCWSTR ManagedInteropMethodName,
PCWSTR ManagedInteropMethodSignature
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledILStubCacheHit()){ return ERROR_SUCCESS;}
INT ManagedInteropMethodNamespace_path_size = -1;
PathCharString ManagedInteropMethodNamespace_PS;
INT ManagedInteropMethodNamespace_full_name_path_size = (PAL_wcslen(ManagedInteropMethodNamespace) + 1)*sizeof(WCHAR);
CHAR* ManagedInteropMethodNamespace_full_name = ManagedInteropMethodNamespace_PS.OpenStringBuffer(ManagedInteropMethodNamespace_full_name_path_size );
if (ManagedInteropMethodNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT ManagedInteropMethodName_path_size = -1;
PathCharString ManagedInteropMethodName_PS;
INT ManagedInteropMethodName_full_name_path_size = (PAL_wcslen(ManagedInteropMethodName) + 1)*sizeof(WCHAR);
CHAR* ManagedInteropMethodName_full_name = ManagedInteropMethodName_PS.OpenStringBuffer(ManagedInteropMethodName_full_name_path_size );
if (ManagedInteropMethodName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT ManagedInteropMethodSignature_path_size = -1;
PathCharString ManagedInteropMethodSignature_PS;
INT ManagedInteropMethodSignature_full_name_path_size = (PAL_wcslen(ManagedInteropMethodSignature) + 1)*sizeof(WCHAR);
CHAR* ManagedInteropMethodSignature_full_name = ManagedInteropMethodSignature_PS.OpenStringBuffer(ManagedInteropMethodSignature_full_name_path_size );
if (ManagedInteropMethodSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ManagedInteropMethodNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, ManagedInteropMethodNamespace, -1, ManagedInteropMethodNamespace_full_name, ManagedInteropMethodNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(ManagedInteropMethodNamespace_path_size < ManagedInteropMethodNamespace_full_name_path_size );
ManagedInteropMethodNamespace_PS.CloseBuffer(ManagedInteropMethodNamespace_path_size );
if( ManagedInteropMethodNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
ManagedInteropMethodName_path_size = WideCharToMultiByte( CP_ACP, 0, ManagedInteropMethodName, -1, ManagedInteropMethodName_full_name, ManagedInteropMethodName_full_name_path_size, NULL, NULL );
_ASSERTE(ManagedInteropMethodName_path_size < ManagedInteropMethodName_full_name_path_size );
ManagedInteropMethodName_PS.CloseBuffer(ManagedInteropMethodName_path_size );
if( ManagedInteropMethodName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
ManagedInteropMethodSignature_path_size = WideCharToMultiByte( CP_ACP, 0, ManagedInteropMethodSignature, -1, ManagedInteropMethodSignature_full_name, ManagedInteropMethodSignature_full_name_path_size, NULL, NULL );
_ASSERTE(ManagedInteropMethodSignature_path_size < ManagedInteropMethodSignature_full_name_path_size );
ManagedInteropMethodSignature_PS.CloseBuffer(ManagedInteropMethodSignature_path_size );
if( ManagedInteropMethodSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
ILStubCacheHit,
ClrInstanceID,
ModuleID,
StubMethodID,
ManagedInteropMethodToken,
ManagedInteropMethodNamespace_full_name,
ManagedInteropMethodName_full_name,
ManagedInteropMethodSignature_full_name
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledDCStartCompleteV2(){ return TRUE;}
extern "C" ULONG FireEtXplatDCStartCompleteV2(
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledDCStartCompleteV2()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
DCStartCompleteV2
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledDCEndCompleteV2(){ return TRUE;}
extern "C" ULONG FireEtXplatDCEndCompleteV2(
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledDCEndCompleteV2()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
DCEndCompleteV2
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledMethodDCStartV2(){ return TRUE;}
extern "C" ULONG FireEtXplatMethodDCStartV2(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledMethodDCStartV2()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
MethodDCStartV2,
MethodID,
ModuleID,
MethodStartAddress,
MethodSize,
MethodToken,
MethodFlags
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledMethodDCEndV2(){ return TRUE;}
extern "C" ULONG FireEtXplatMethodDCEndV2(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledMethodDCEndV2()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
MethodDCEndV2,
MethodID,
ModuleID,
MethodStartAddress,
MethodSize,
MethodToken,
MethodFlags
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledMethodDCStartVerboseV2(){ return TRUE;}
extern "C" ULONG FireEtXplatMethodDCStartVerboseV2(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags,
PCWSTR MethodNamespace,
PCWSTR MethodName,
PCWSTR MethodSignature
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledMethodDCStartVerboseV2()){ return ERROR_SUCCESS;}
INT MethodNamespace_path_size = -1;
PathCharString MethodNamespace_PS;
INT MethodNamespace_full_name_path_size = (PAL_wcslen(MethodNamespace) + 1)*sizeof(WCHAR);
CHAR* MethodNamespace_full_name = MethodNamespace_PS.OpenStringBuffer(MethodNamespace_full_name_path_size );
if (MethodNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodName_path_size = -1;
PathCharString MethodName_PS;
INT MethodName_full_name_path_size = (PAL_wcslen(MethodName) + 1)*sizeof(WCHAR);
CHAR* MethodName_full_name = MethodName_PS.OpenStringBuffer(MethodName_full_name_path_size );
if (MethodName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodSignature_path_size = -1;
PathCharString MethodSignature_PS;
INT MethodSignature_full_name_path_size = (PAL_wcslen(MethodSignature) + 1)*sizeof(WCHAR);
CHAR* MethodSignature_full_name = MethodSignature_PS.OpenStringBuffer(MethodSignature_full_name_path_size );
if (MethodSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
MethodNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, MethodNamespace, -1, MethodNamespace_full_name, MethodNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(MethodNamespace_path_size < MethodNamespace_full_name_path_size );
MethodNamespace_PS.CloseBuffer(MethodNamespace_path_size );
if( MethodNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodName_path_size = WideCharToMultiByte( CP_ACP, 0, MethodName, -1, MethodName_full_name, MethodName_full_name_path_size, NULL, NULL );
_ASSERTE(MethodName_path_size < MethodName_full_name_path_size );
MethodName_PS.CloseBuffer(MethodName_path_size );
if( MethodName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodSignature_path_size = WideCharToMultiByte( CP_ACP, 0, MethodSignature, -1, MethodSignature_full_name, MethodSignature_full_name_path_size, NULL, NULL );
_ASSERTE(MethodSignature_path_size < MethodSignature_full_name_path_size );
MethodSignature_PS.CloseBuffer(MethodSignature_path_size );
if( MethodSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
MethodDCStartVerboseV2,
MethodID,
ModuleID,
MethodStartAddress,
MethodSize,
MethodToken,
MethodFlags,
MethodNamespace_full_name,
MethodName_full_name,
MethodSignature_full_name
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledMethodDCEndVerboseV2(){ return TRUE;}
extern "C" ULONG FireEtXplatMethodDCEndVerboseV2(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags,
PCWSTR MethodNamespace,
PCWSTR MethodName,
PCWSTR MethodSignature
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledMethodDCEndVerboseV2()){ return ERROR_SUCCESS;}
INT MethodNamespace_path_size = -1;
PathCharString MethodNamespace_PS;
INT MethodNamespace_full_name_path_size = (PAL_wcslen(MethodNamespace) + 1)*sizeof(WCHAR);
CHAR* MethodNamespace_full_name = MethodNamespace_PS.OpenStringBuffer(MethodNamespace_full_name_path_size );
if (MethodNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodName_path_size = -1;
PathCharString MethodName_PS;
INT MethodName_full_name_path_size = (PAL_wcslen(MethodName) + 1)*sizeof(WCHAR);
CHAR* MethodName_full_name = MethodName_PS.OpenStringBuffer(MethodName_full_name_path_size );
if (MethodName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodSignature_path_size = -1;
PathCharString MethodSignature_PS;
INT MethodSignature_full_name_path_size = (PAL_wcslen(MethodSignature) + 1)*sizeof(WCHAR);
CHAR* MethodSignature_full_name = MethodSignature_PS.OpenStringBuffer(MethodSignature_full_name_path_size );
if (MethodSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
MethodNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, MethodNamespace, -1, MethodNamespace_full_name, MethodNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(MethodNamespace_path_size < MethodNamespace_full_name_path_size );
MethodNamespace_PS.CloseBuffer(MethodNamespace_path_size );
if( MethodNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodName_path_size = WideCharToMultiByte( CP_ACP, 0, MethodName, -1, MethodName_full_name, MethodName_full_name_path_size, NULL, NULL );
_ASSERTE(MethodName_path_size < MethodName_full_name_path_size );
MethodName_PS.CloseBuffer(MethodName_path_size );
if( MethodName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodSignature_path_size = WideCharToMultiByte( CP_ACP, 0, MethodSignature, -1, MethodSignature_full_name, MethodSignature_full_name_path_size, NULL, NULL );
_ASSERTE(MethodSignature_path_size < MethodSignature_full_name_path_size );
MethodSignature_PS.CloseBuffer(MethodSignature_path_size );
if( MethodSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
MethodDCEndVerboseV2,
MethodID,
ModuleID,
MethodStartAddress,
MethodSize,
MethodToken,
MethodFlags,
MethodNamespace_full_name,
MethodName_full_name,
MethodSignature_full_name
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledMethodLoad(){ return TRUE;}
extern "C" ULONG FireEtXplatMethodLoad(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledMethodLoad()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
MethodLoad,
MethodID,
ModuleID,
MethodStartAddress,
MethodSize,
MethodToken,
MethodFlags
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledMethodLoad_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatMethodLoad_V1(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledMethodLoad_V1()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
MethodLoad_V1,
MethodID,
ModuleID,
MethodStartAddress,
MethodSize,
MethodToken,
MethodFlags,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledMethodLoad_V2(){ return TRUE;}
extern "C" ULONG FireEtXplatMethodLoad_V2(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags,
const unsigned short ClrInstanceID,
const unsigned __int64 ReJITID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledMethodLoad_V2()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
MethodLoad_V2,
MethodID,
ModuleID,
MethodStartAddress,
MethodSize,
MethodToken,
MethodFlags,
ClrInstanceID,
ReJITID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledMethodUnload(){ return TRUE;}
extern "C" ULONG FireEtXplatMethodUnload(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledMethodUnload()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
MethodUnload,
MethodID,
ModuleID,
MethodStartAddress,
MethodSize,
MethodToken,
MethodFlags
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledMethodUnload_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatMethodUnload_V1(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledMethodUnload_V1()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
MethodUnload_V1,
MethodID,
ModuleID,
MethodStartAddress,
MethodSize,
MethodToken,
MethodFlags,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledMethodUnload_V2(){ return TRUE;}
extern "C" ULONG FireEtXplatMethodUnload_V2(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags,
const unsigned short ClrInstanceID,
const unsigned __int64 ReJITID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledMethodUnload_V2()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
MethodUnload_V2,
MethodID,
ModuleID,
MethodStartAddress,
MethodSize,
MethodToken,
MethodFlags,
ClrInstanceID,
ReJITID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledMethodLoadVerbose(){ return TRUE;}
extern "C" ULONG FireEtXplatMethodLoadVerbose(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags,
PCWSTR MethodNamespace,
PCWSTR MethodName,
PCWSTR MethodSignature
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledMethodLoadVerbose()){ return ERROR_SUCCESS;}
INT MethodNamespace_path_size = -1;
PathCharString MethodNamespace_PS;
INT MethodNamespace_full_name_path_size = (PAL_wcslen(MethodNamespace) + 1)*sizeof(WCHAR);
CHAR* MethodNamespace_full_name = MethodNamespace_PS.OpenStringBuffer(MethodNamespace_full_name_path_size );
if (MethodNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodName_path_size = -1;
PathCharString MethodName_PS;
INT MethodName_full_name_path_size = (PAL_wcslen(MethodName) + 1)*sizeof(WCHAR);
CHAR* MethodName_full_name = MethodName_PS.OpenStringBuffer(MethodName_full_name_path_size );
if (MethodName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodSignature_path_size = -1;
PathCharString MethodSignature_PS;
INT MethodSignature_full_name_path_size = (PAL_wcslen(MethodSignature) + 1)*sizeof(WCHAR);
CHAR* MethodSignature_full_name = MethodSignature_PS.OpenStringBuffer(MethodSignature_full_name_path_size );
if (MethodSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
MethodNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, MethodNamespace, -1, MethodNamespace_full_name, MethodNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(MethodNamespace_path_size < MethodNamespace_full_name_path_size );
MethodNamespace_PS.CloseBuffer(MethodNamespace_path_size );
if( MethodNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodName_path_size = WideCharToMultiByte( CP_ACP, 0, MethodName, -1, MethodName_full_name, MethodName_full_name_path_size, NULL, NULL );
_ASSERTE(MethodName_path_size < MethodName_full_name_path_size );
MethodName_PS.CloseBuffer(MethodName_path_size );
if( MethodName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodSignature_path_size = WideCharToMultiByte( CP_ACP, 0, MethodSignature, -1, MethodSignature_full_name, MethodSignature_full_name_path_size, NULL, NULL );
_ASSERTE(MethodSignature_path_size < MethodSignature_full_name_path_size );
MethodSignature_PS.CloseBuffer(MethodSignature_path_size );
if( MethodSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
MethodLoadVerbose,
MethodID,
ModuleID,
MethodStartAddress,
MethodSize,
MethodToken,
MethodFlags,
MethodNamespace_full_name,
MethodName_full_name,
MethodSignature_full_name
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledMethodLoadVerbose_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatMethodLoadVerbose_V1(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags,
PCWSTR MethodNamespace,
PCWSTR MethodName,
PCWSTR MethodSignature,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledMethodLoadVerbose_V1()){ return ERROR_SUCCESS;}
INT MethodNamespace_path_size = -1;
PathCharString MethodNamespace_PS;
INT MethodNamespace_full_name_path_size = (PAL_wcslen(MethodNamespace) + 1)*sizeof(WCHAR);
CHAR* MethodNamespace_full_name = MethodNamespace_PS.OpenStringBuffer(MethodNamespace_full_name_path_size );
if (MethodNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodName_path_size = -1;
PathCharString MethodName_PS;
INT MethodName_full_name_path_size = (PAL_wcslen(MethodName) + 1)*sizeof(WCHAR);
CHAR* MethodName_full_name = MethodName_PS.OpenStringBuffer(MethodName_full_name_path_size );
if (MethodName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodSignature_path_size = -1;
PathCharString MethodSignature_PS;
INT MethodSignature_full_name_path_size = (PAL_wcslen(MethodSignature) + 1)*sizeof(WCHAR);
CHAR* MethodSignature_full_name = MethodSignature_PS.OpenStringBuffer(MethodSignature_full_name_path_size );
if (MethodSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
MethodNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, MethodNamespace, -1, MethodNamespace_full_name, MethodNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(MethodNamespace_path_size < MethodNamespace_full_name_path_size );
MethodNamespace_PS.CloseBuffer(MethodNamespace_path_size );
if( MethodNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodName_path_size = WideCharToMultiByte( CP_ACP, 0, MethodName, -1, MethodName_full_name, MethodName_full_name_path_size, NULL, NULL );
_ASSERTE(MethodName_path_size < MethodName_full_name_path_size );
MethodName_PS.CloseBuffer(MethodName_path_size );
if( MethodName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodSignature_path_size = WideCharToMultiByte( CP_ACP, 0, MethodSignature, -1, MethodSignature_full_name, MethodSignature_full_name_path_size, NULL, NULL );
_ASSERTE(MethodSignature_path_size < MethodSignature_full_name_path_size );
MethodSignature_PS.CloseBuffer(MethodSignature_path_size );
if( MethodSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
MethodLoadVerbose_V1,
MethodID,
ModuleID,
MethodStartAddress,
MethodSize,
MethodToken,
MethodFlags,
MethodNamespace_full_name,
MethodName_full_name,
MethodSignature_full_name,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledMethodLoadVerbose_V2(){ return TRUE;}
extern "C" ULONG FireEtXplatMethodLoadVerbose_V2(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags,
PCWSTR MethodNamespace,
PCWSTR MethodName,
PCWSTR MethodSignature,
const unsigned short ClrInstanceID,
const unsigned __int64 ReJITID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledMethodLoadVerbose_V2()){ return ERROR_SUCCESS;}
INT MethodNamespace_path_size = -1;
PathCharString MethodNamespace_PS;
INT MethodNamespace_full_name_path_size = (PAL_wcslen(MethodNamespace) + 1)*sizeof(WCHAR);
CHAR* MethodNamespace_full_name = MethodNamespace_PS.OpenStringBuffer(MethodNamespace_full_name_path_size );
if (MethodNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodName_path_size = -1;
PathCharString MethodName_PS;
INT MethodName_full_name_path_size = (PAL_wcslen(MethodName) + 1)*sizeof(WCHAR);
CHAR* MethodName_full_name = MethodName_PS.OpenStringBuffer(MethodName_full_name_path_size );
if (MethodName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodSignature_path_size = -1;
PathCharString MethodSignature_PS;
INT MethodSignature_full_name_path_size = (PAL_wcslen(MethodSignature) + 1)*sizeof(WCHAR);
CHAR* MethodSignature_full_name = MethodSignature_PS.OpenStringBuffer(MethodSignature_full_name_path_size );
if (MethodSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
MethodNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, MethodNamespace, -1, MethodNamespace_full_name, MethodNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(MethodNamespace_path_size < MethodNamespace_full_name_path_size );
MethodNamespace_PS.CloseBuffer(MethodNamespace_path_size );
if( MethodNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodName_path_size = WideCharToMultiByte( CP_ACP, 0, MethodName, -1, MethodName_full_name, MethodName_full_name_path_size, NULL, NULL );
_ASSERTE(MethodName_path_size < MethodName_full_name_path_size );
MethodName_PS.CloseBuffer(MethodName_path_size );
if( MethodName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodSignature_path_size = WideCharToMultiByte( CP_ACP, 0, MethodSignature, -1, MethodSignature_full_name, MethodSignature_full_name_path_size, NULL, NULL );
_ASSERTE(MethodSignature_path_size < MethodSignature_full_name_path_size );
MethodSignature_PS.CloseBuffer(MethodSignature_path_size );
if( MethodSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
MethodLoadVerbose_V2,
MethodID,
ModuleID,
MethodStartAddress,
MethodSize,
MethodToken,
MethodFlags,
MethodNamespace_full_name,
MethodName_full_name,
MethodSignature_full_name,
ClrInstanceID
);
tracepoint(
DotNETRuntime,
MethodLoadVerbose_V2_1,
ReJITID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledMethodUnloadVerbose(){ return TRUE;}
extern "C" ULONG FireEtXplatMethodUnloadVerbose(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags,
PCWSTR MethodNamespace,
PCWSTR MethodName,
PCWSTR MethodSignature
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledMethodUnloadVerbose()){ return ERROR_SUCCESS;}
INT MethodNamespace_path_size = -1;
PathCharString MethodNamespace_PS;
INT MethodNamespace_full_name_path_size = (PAL_wcslen(MethodNamespace) + 1)*sizeof(WCHAR);
CHAR* MethodNamespace_full_name = MethodNamespace_PS.OpenStringBuffer(MethodNamespace_full_name_path_size );
if (MethodNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodName_path_size = -1;
PathCharString MethodName_PS;
INT MethodName_full_name_path_size = (PAL_wcslen(MethodName) + 1)*sizeof(WCHAR);
CHAR* MethodName_full_name = MethodName_PS.OpenStringBuffer(MethodName_full_name_path_size );
if (MethodName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodSignature_path_size = -1;
PathCharString MethodSignature_PS;
INT MethodSignature_full_name_path_size = (PAL_wcslen(MethodSignature) + 1)*sizeof(WCHAR);
CHAR* MethodSignature_full_name = MethodSignature_PS.OpenStringBuffer(MethodSignature_full_name_path_size );
if (MethodSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
MethodNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, MethodNamespace, -1, MethodNamespace_full_name, MethodNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(MethodNamespace_path_size < MethodNamespace_full_name_path_size );
MethodNamespace_PS.CloseBuffer(MethodNamespace_path_size );
if( MethodNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodName_path_size = WideCharToMultiByte( CP_ACP, 0, MethodName, -1, MethodName_full_name, MethodName_full_name_path_size, NULL, NULL );
_ASSERTE(MethodName_path_size < MethodName_full_name_path_size );
MethodName_PS.CloseBuffer(MethodName_path_size );
if( MethodName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodSignature_path_size = WideCharToMultiByte( CP_ACP, 0, MethodSignature, -1, MethodSignature_full_name, MethodSignature_full_name_path_size, NULL, NULL );
_ASSERTE(MethodSignature_path_size < MethodSignature_full_name_path_size );
MethodSignature_PS.CloseBuffer(MethodSignature_path_size );
if( MethodSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
MethodUnloadVerbose,
MethodID,
ModuleID,
MethodStartAddress,
MethodSize,
MethodToken,
MethodFlags,
MethodNamespace_full_name,
MethodName_full_name,
MethodSignature_full_name
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledMethodUnloadVerbose_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatMethodUnloadVerbose_V1(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags,
PCWSTR MethodNamespace,
PCWSTR MethodName,
PCWSTR MethodSignature,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledMethodUnloadVerbose_V1()){ return ERROR_SUCCESS;}
INT MethodNamespace_path_size = -1;
PathCharString MethodNamespace_PS;
INT MethodNamespace_full_name_path_size = (PAL_wcslen(MethodNamespace) + 1)*sizeof(WCHAR);
CHAR* MethodNamespace_full_name = MethodNamespace_PS.OpenStringBuffer(MethodNamespace_full_name_path_size );
if (MethodNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodName_path_size = -1;
PathCharString MethodName_PS;
INT MethodName_full_name_path_size = (PAL_wcslen(MethodName) + 1)*sizeof(WCHAR);
CHAR* MethodName_full_name = MethodName_PS.OpenStringBuffer(MethodName_full_name_path_size );
if (MethodName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodSignature_path_size = -1;
PathCharString MethodSignature_PS;
INT MethodSignature_full_name_path_size = (PAL_wcslen(MethodSignature) + 1)*sizeof(WCHAR);
CHAR* MethodSignature_full_name = MethodSignature_PS.OpenStringBuffer(MethodSignature_full_name_path_size );
if (MethodSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
MethodNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, MethodNamespace, -1, MethodNamespace_full_name, MethodNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(MethodNamespace_path_size < MethodNamespace_full_name_path_size );
MethodNamespace_PS.CloseBuffer(MethodNamespace_path_size );
if( MethodNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodName_path_size = WideCharToMultiByte( CP_ACP, 0, MethodName, -1, MethodName_full_name, MethodName_full_name_path_size, NULL, NULL );
_ASSERTE(MethodName_path_size < MethodName_full_name_path_size );
MethodName_PS.CloseBuffer(MethodName_path_size );
if( MethodName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodSignature_path_size = WideCharToMultiByte( CP_ACP, 0, MethodSignature, -1, MethodSignature_full_name, MethodSignature_full_name_path_size, NULL, NULL );
_ASSERTE(MethodSignature_path_size < MethodSignature_full_name_path_size );
MethodSignature_PS.CloseBuffer(MethodSignature_path_size );
if( MethodSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
MethodUnloadVerbose_V1,
MethodID,
ModuleID,
MethodStartAddress,
MethodSize,
MethodToken,
MethodFlags,
MethodNamespace_full_name,
MethodName_full_name,
MethodSignature_full_name,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledMethodUnloadVerbose_V2(){ return TRUE;}
extern "C" ULONG FireEtXplatMethodUnloadVerbose_V2(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned __int64 MethodStartAddress,
const unsigned int MethodSize,
const unsigned int MethodToken,
const unsigned int MethodFlags,
PCWSTR MethodNamespace,
PCWSTR MethodName,
PCWSTR MethodSignature,
const unsigned short ClrInstanceID,
const unsigned __int64 ReJITID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledMethodUnloadVerbose_V2()){ return ERROR_SUCCESS;}
INT MethodNamespace_path_size = -1;
PathCharString MethodNamespace_PS;
INT MethodNamespace_full_name_path_size = (PAL_wcslen(MethodNamespace) + 1)*sizeof(WCHAR);
CHAR* MethodNamespace_full_name = MethodNamespace_PS.OpenStringBuffer(MethodNamespace_full_name_path_size );
if (MethodNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodName_path_size = -1;
PathCharString MethodName_PS;
INT MethodName_full_name_path_size = (PAL_wcslen(MethodName) + 1)*sizeof(WCHAR);
CHAR* MethodName_full_name = MethodName_PS.OpenStringBuffer(MethodName_full_name_path_size );
if (MethodName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodSignature_path_size = -1;
PathCharString MethodSignature_PS;
INT MethodSignature_full_name_path_size = (PAL_wcslen(MethodSignature) + 1)*sizeof(WCHAR);
CHAR* MethodSignature_full_name = MethodSignature_PS.OpenStringBuffer(MethodSignature_full_name_path_size );
if (MethodSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
MethodNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, MethodNamespace, -1, MethodNamespace_full_name, MethodNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(MethodNamespace_path_size < MethodNamespace_full_name_path_size );
MethodNamespace_PS.CloseBuffer(MethodNamespace_path_size );
if( MethodNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodName_path_size = WideCharToMultiByte( CP_ACP, 0, MethodName, -1, MethodName_full_name, MethodName_full_name_path_size, NULL, NULL );
_ASSERTE(MethodName_path_size < MethodName_full_name_path_size );
MethodName_PS.CloseBuffer(MethodName_path_size );
if( MethodName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodSignature_path_size = WideCharToMultiByte( CP_ACP, 0, MethodSignature, -1, MethodSignature_full_name, MethodSignature_full_name_path_size, NULL, NULL );
_ASSERTE(MethodSignature_path_size < MethodSignature_full_name_path_size );
MethodSignature_PS.CloseBuffer(MethodSignature_path_size );
if( MethodSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
MethodUnloadVerbose_V2,
MethodID,
ModuleID,
MethodStartAddress,
MethodSize,
MethodToken,
MethodFlags,
MethodNamespace_full_name,
MethodName_full_name,
MethodSignature_full_name,
ClrInstanceID
);
tracepoint(
DotNETRuntime,
MethodUnloadVerbose_V2_1,
ReJITID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledMethodJittingStarted(){ return TRUE;}
extern "C" ULONG FireEtXplatMethodJittingStarted(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned int MethodToken,
const unsigned int MethodILSize,
PCWSTR MethodNamespace,
PCWSTR MethodName,
PCWSTR MethodSignature
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledMethodJittingStarted()){ return ERROR_SUCCESS;}
INT MethodNamespace_path_size = -1;
PathCharString MethodNamespace_PS;
INT MethodNamespace_full_name_path_size = (PAL_wcslen(MethodNamespace) + 1)*sizeof(WCHAR);
CHAR* MethodNamespace_full_name = MethodNamespace_PS.OpenStringBuffer(MethodNamespace_full_name_path_size );
if (MethodNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodName_path_size = -1;
PathCharString MethodName_PS;
INT MethodName_full_name_path_size = (PAL_wcslen(MethodName) + 1)*sizeof(WCHAR);
CHAR* MethodName_full_name = MethodName_PS.OpenStringBuffer(MethodName_full_name_path_size );
if (MethodName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodSignature_path_size = -1;
PathCharString MethodSignature_PS;
INT MethodSignature_full_name_path_size = (PAL_wcslen(MethodSignature) + 1)*sizeof(WCHAR);
CHAR* MethodSignature_full_name = MethodSignature_PS.OpenStringBuffer(MethodSignature_full_name_path_size );
if (MethodSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
MethodNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, MethodNamespace, -1, MethodNamespace_full_name, MethodNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(MethodNamespace_path_size < MethodNamespace_full_name_path_size );
MethodNamespace_PS.CloseBuffer(MethodNamespace_path_size );
if( MethodNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodName_path_size = WideCharToMultiByte( CP_ACP, 0, MethodName, -1, MethodName_full_name, MethodName_full_name_path_size, NULL, NULL );
_ASSERTE(MethodName_path_size < MethodName_full_name_path_size );
MethodName_PS.CloseBuffer(MethodName_path_size );
if( MethodName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodSignature_path_size = WideCharToMultiByte( CP_ACP, 0, MethodSignature, -1, MethodSignature_full_name, MethodSignature_full_name_path_size, NULL, NULL );
_ASSERTE(MethodSignature_path_size < MethodSignature_full_name_path_size );
MethodSignature_PS.CloseBuffer(MethodSignature_path_size );
if( MethodSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
MethodJittingStarted,
MethodID,
ModuleID,
MethodToken,
MethodILSize,
MethodNamespace_full_name,
MethodName_full_name,
MethodSignature_full_name
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledMethodJittingStarted_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatMethodJittingStarted_V1(
const unsigned __int64 MethodID,
const unsigned __int64 ModuleID,
const unsigned int MethodToken,
const unsigned int MethodILSize,
PCWSTR MethodNamespace,
PCWSTR MethodName,
PCWSTR MethodSignature,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledMethodJittingStarted_V1()){ return ERROR_SUCCESS;}
INT MethodNamespace_path_size = -1;
PathCharString MethodNamespace_PS;
INT MethodNamespace_full_name_path_size = (PAL_wcslen(MethodNamespace) + 1)*sizeof(WCHAR);
CHAR* MethodNamespace_full_name = MethodNamespace_PS.OpenStringBuffer(MethodNamespace_full_name_path_size );
if (MethodNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodName_path_size = -1;
PathCharString MethodName_PS;
INT MethodName_full_name_path_size = (PAL_wcslen(MethodName) + 1)*sizeof(WCHAR);
CHAR* MethodName_full_name = MethodName_PS.OpenStringBuffer(MethodName_full_name_path_size );
if (MethodName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodSignature_path_size = -1;
PathCharString MethodSignature_PS;
INT MethodSignature_full_name_path_size = (PAL_wcslen(MethodSignature) + 1)*sizeof(WCHAR);
CHAR* MethodSignature_full_name = MethodSignature_PS.OpenStringBuffer(MethodSignature_full_name_path_size );
if (MethodSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
MethodNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, MethodNamespace, -1, MethodNamespace_full_name, MethodNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(MethodNamespace_path_size < MethodNamespace_full_name_path_size );
MethodNamespace_PS.CloseBuffer(MethodNamespace_path_size );
if( MethodNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodName_path_size = WideCharToMultiByte( CP_ACP, 0, MethodName, -1, MethodName_full_name, MethodName_full_name_path_size, NULL, NULL );
_ASSERTE(MethodName_path_size < MethodName_full_name_path_size );
MethodName_PS.CloseBuffer(MethodName_path_size );
if( MethodName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodSignature_path_size = WideCharToMultiByte( CP_ACP, 0, MethodSignature, -1, MethodSignature_full_name, MethodSignature_full_name_path_size, NULL, NULL );
_ASSERTE(MethodSignature_path_size < MethodSignature_full_name_path_size );
MethodSignature_PS.CloseBuffer(MethodSignature_path_size );
if( MethodSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
MethodJittingStarted_V1,
MethodID,
ModuleID,
MethodToken,
MethodILSize,
MethodNamespace_full_name,
MethodName_full_name,
MethodSignature_full_name,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledMethodJitInliningSucceeded(){ return TRUE;}
extern "C" ULONG FireEtXplatMethodJitInliningSucceeded(
PCWSTR MethodBeingCompiledNamespace,
PCWSTR MethodBeingCompiledName,
PCWSTR MethodBeingCompiledNameSignature,
PCWSTR InlinerNamespace,
PCWSTR InlinerName,
PCWSTR InlinerNameSignature,
PCWSTR InlineeNamespace,
PCWSTR InlineeName,
PCWSTR InlineeNameSignature,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledMethodJitInliningSucceeded()){ return ERROR_SUCCESS;}
INT MethodBeingCompiledNamespace_path_size = -1;
PathCharString MethodBeingCompiledNamespace_PS;
INT MethodBeingCompiledNamespace_full_name_path_size = (PAL_wcslen(MethodBeingCompiledNamespace) + 1)*sizeof(WCHAR);
CHAR* MethodBeingCompiledNamespace_full_name = MethodBeingCompiledNamespace_PS.OpenStringBuffer(MethodBeingCompiledNamespace_full_name_path_size );
if (MethodBeingCompiledNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodBeingCompiledName_path_size = -1;
PathCharString MethodBeingCompiledName_PS;
INT MethodBeingCompiledName_full_name_path_size = (PAL_wcslen(MethodBeingCompiledName) + 1)*sizeof(WCHAR);
CHAR* MethodBeingCompiledName_full_name = MethodBeingCompiledName_PS.OpenStringBuffer(MethodBeingCompiledName_full_name_path_size );
if (MethodBeingCompiledName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodBeingCompiledNameSignature_path_size = -1;
PathCharString MethodBeingCompiledNameSignature_PS;
INT MethodBeingCompiledNameSignature_full_name_path_size = (PAL_wcslen(MethodBeingCompiledNameSignature) + 1)*sizeof(WCHAR);
CHAR* MethodBeingCompiledNameSignature_full_name = MethodBeingCompiledNameSignature_PS.OpenStringBuffer(MethodBeingCompiledNameSignature_full_name_path_size );
if (MethodBeingCompiledNameSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT InlinerNamespace_path_size = -1;
PathCharString InlinerNamespace_PS;
INT InlinerNamespace_full_name_path_size = (PAL_wcslen(InlinerNamespace) + 1)*sizeof(WCHAR);
CHAR* InlinerNamespace_full_name = InlinerNamespace_PS.OpenStringBuffer(InlinerNamespace_full_name_path_size );
if (InlinerNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT InlinerName_path_size = -1;
PathCharString InlinerName_PS;
INT InlinerName_full_name_path_size = (PAL_wcslen(InlinerName) + 1)*sizeof(WCHAR);
CHAR* InlinerName_full_name = InlinerName_PS.OpenStringBuffer(InlinerName_full_name_path_size );
if (InlinerName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT InlinerNameSignature_path_size = -1;
PathCharString InlinerNameSignature_PS;
INT InlinerNameSignature_full_name_path_size = (PAL_wcslen(InlinerNameSignature) + 1)*sizeof(WCHAR);
CHAR* InlinerNameSignature_full_name = InlinerNameSignature_PS.OpenStringBuffer(InlinerNameSignature_full_name_path_size );
if (InlinerNameSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT InlineeNamespace_path_size = -1;
PathCharString InlineeNamespace_PS;
INT InlineeNamespace_full_name_path_size = (PAL_wcslen(InlineeNamespace) + 1)*sizeof(WCHAR);
CHAR* InlineeNamespace_full_name = InlineeNamespace_PS.OpenStringBuffer(InlineeNamespace_full_name_path_size );
if (InlineeNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT InlineeName_path_size = -1;
PathCharString InlineeName_PS;
INT InlineeName_full_name_path_size = (PAL_wcslen(InlineeName) + 1)*sizeof(WCHAR);
CHAR* InlineeName_full_name = InlineeName_PS.OpenStringBuffer(InlineeName_full_name_path_size );
if (InlineeName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT InlineeNameSignature_path_size = -1;
PathCharString InlineeNameSignature_PS;
INT InlineeNameSignature_full_name_path_size = (PAL_wcslen(InlineeNameSignature) + 1)*sizeof(WCHAR);
CHAR* InlineeNameSignature_full_name = InlineeNameSignature_PS.OpenStringBuffer(InlineeNameSignature_full_name_path_size );
if (InlineeNameSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
MethodBeingCompiledNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, MethodBeingCompiledNamespace, -1, MethodBeingCompiledNamespace_full_name, MethodBeingCompiledNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(MethodBeingCompiledNamespace_path_size < MethodBeingCompiledNamespace_full_name_path_size );
MethodBeingCompiledNamespace_PS.CloseBuffer(MethodBeingCompiledNamespace_path_size );
if( MethodBeingCompiledNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodBeingCompiledName_path_size = WideCharToMultiByte( CP_ACP, 0, MethodBeingCompiledName, -1, MethodBeingCompiledName_full_name, MethodBeingCompiledName_full_name_path_size, NULL, NULL );
_ASSERTE(MethodBeingCompiledName_path_size < MethodBeingCompiledName_full_name_path_size );
MethodBeingCompiledName_PS.CloseBuffer(MethodBeingCompiledName_path_size );
if( MethodBeingCompiledName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodBeingCompiledNameSignature_path_size = WideCharToMultiByte( CP_ACP, 0, MethodBeingCompiledNameSignature, -1, MethodBeingCompiledNameSignature_full_name, MethodBeingCompiledNameSignature_full_name_path_size, NULL, NULL );
_ASSERTE(MethodBeingCompiledNameSignature_path_size < MethodBeingCompiledNameSignature_full_name_path_size );
MethodBeingCompiledNameSignature_PS.CloseBuffer(MethodBeingCompiledNameSignature_path_size );
if( MethodBeingCompiledNameSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
InlinerNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, InlinerNamespace, -1, InlinerNamespace_full_name, InlinerNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(InlinerNamespace_path_size < InlinerNamespace_full_name_path_size );
InlinerNamespace_PS.CloseBuffer(InlinerNamespace_path_size );
if( InlinerNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
InlinerName_path_size = WideCharToMultiByte( CP_ACP, 0, InlinerName, -1, InlinerName_full_name, InlinerName_full_name_path_size, NULL, NULL );
_ASSERTE(InlinerName_path_size < InlinerName_full_name_path_size );
InlinerName_PS.CloseBuffer(InlinerName_path_size );
if( InlinerName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
InlinerNameSignature_path_size = WideCharToMultiByte( CP_ACP, 0, InlinerNameSignature, -1, InlinerNameSignature_full_name, InlinerNameSignature_full_name_path_size, NULL, NULL );
_ASSERTE(InlinerNameSignature_path_size < InlinerNameSignature_full_name_path_size );
InlinerNameSignature_PS.CloseBuffer(InlinerNameSignature_path_size );
if( InlinerNameSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
InlineeNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, InlineeNamespace, -1, InlineeNamespace_full_name, InlineeNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(InlineeNamespace_path_size < InlineeNamespace_full_name_path_size );
InlineeNamespace_PS.CloseBuffer(InlineeNamespace_path_size );
if( InlineeNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
InlineeName_path_size = WideCharToMultiByte( CP_ACP, 0, InlineeName, -1, InlineeName_full_name, InlineeName_full_name_path_size, NULL, NULL );
_ASSERTE(InlineeName_path_size < InlineeName_full_name_path_size );
InlineeName_PS.CloseBuffer(InlineeName_path_size );
if( InlineeName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
InlineeNameSignature_path_size = WideCharToMultiByte( CP_ACP, 0, InlineeNameSignature, -1, InlineeNameSignature_full_name, InlineeNameSignature_full_name_path_size, NULL, NULL );
_ASSERTE(InlineeNameSignature_path_size < InlineeNameSignature_full_name_path_size );
InlineeNameSignature_PS.CloseBuffer(InlineeNameSignature_path_size );
if( InlineeNameSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
MethodJitInliningSucceeded,
MethodBeingCompiledNamespace_full_name,
MethodBeingCompiledName_full_name,
MethodBeingCompiledNameSignature_full_name,
InlinerNamespace_full_name,
InlinerName_full_name,
InlinerNameSignature_full_name,
InlineeNamespace_full_name,
InlineeName_full_name,
InlineeNameSignature_full_name,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledMethodJitInliningFailed(){ return TRUE;}
extern "C" ULONG FireEtXplatMethodJitInliningFailed(
PCWSTR MethodBeingCompiledNamespace,
PCWSTR MethodBeingCompiledName,
PCWSTR MethodBeingCompiledNameSignature,
PCWSTR InlinerNamespace,
PCWSTR InlinerName,
PCWSTR InlinerNameSignature,
PCWSTR InlineeNamespace,
PCWSTR InlineeName,
PCWSTR InlineeNameSignature,
const BOOL FailAlways,
LPCSTR FailReason,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledMethodJitInliningFailed()){ return ERROR_SUCCESS;}
INT MethodBeingCompiledNamespace_path_size = -1;
PathCharString MethodBeingCompiledNamespace_PS;
INT MethodBeingCompiledNamespace_full_name_path_size = (PAL_wcslen(MethodBeingCompiledNamespace) + 1)*sizeof(WCHAR);
CHAR* MethodBeingCompiledNamespace_full_name = MethodBeingCompiledNamespace_PS.OpenStringBuffer(MethodBeingCompiledNamespace_full_name_path_size );
if (MethodBeingCompiledNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodBeingCompiledName_path_size = -1;
PathCharString MethodBeingCompiledName_PS;
INT MethodBeingCompiledName_full_name_path_size = (PAL_wcslen(MethodBeingCompiledName) + 1)*sizeof(WCHAR);
CHAR* MethodBeingCompiledName_full_name = MethodBeingCompiledName_PS.OpenStringBuffer(MethodBeingCompiledName_full_name_path_size );
if (MethodBeingCompiledName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodBeingCompiledNameSignature_path_size = -1;
PathCharString MethodBeingCompiledNameSignature_PS;
INT MethodBeingCompiledNameSignature_full_name_path_size = (PAL_wcslen(MethodBeingCompiledNameSignature) + 1)*sizeof(WCHAR);
CHAR* MethodBeingCompiledNameSignature_full_name = MethodBeingCompiledNameSignature_PS.OpenStringBuffer(MethodBeingCompiledNameSignature_full_name_path_size );
if (MethodBeingCompiledNameSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT InlinerNamespace_path_size = -1;
PathCharString InlinerNamespace_PS;
INT InlinerNamespace_full_name_path_size = (PAL_wcslen(InlinerNamespace) + 1)*sizeof(WCHAR);
CHAR* InlinerNamespace_full_name = InlinerNamespace_PS.OpenStringBuffer(InlinerNamespace_full_name_path_size );
if (InlinerNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT InlinerName_path_size = -1;
PathCharString InlinerName_PS;
INT InlinerName_full_name_path_size = (PAL_wcslen(InlinerName) + 1)*sizeof(WCHAR);
CHAR* InlinerName_full_name = InlinerName_PS.OpenStringBuffer(InlinerName_full_name_path_size );
if (InlinerName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT InlinerNameSignature_path_size = -1;
PathCharString InlinerNameSignature_PS;
INT InlinerNameSignature_full_name_path_size = (PAL_wcslen(InlinerNameSignature) + 1)*sizeof(WCHAR);
CHAR* InlinerNameSignature_full_name = InlinerNameSignature_PS.OpenStringBuffer(InlinerNameSignature_full_name_path_size );
if (InlinerNameSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT InlineeNamespace_path_size = -1;
PathCharString InlineeNamespace_PS;
INT InlineeNamespace_full_name_path_size = (PAL_wcslen(InlineeNamespace) + 1)*sizeof(WCHAR);
CHAR* InlineeNamespace_full_name = InlineeNamespace_PS.OpenStringBuffer(InlineeNamespace_full_name_path_size );
if (InlineeNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT InlineeName_path_size = -1;
PathCharString InlineeName_PS;
INT InlineeName_full_name_path_size = (PAL_wcslen(InlineeName) + 1)*sizeof(WCHAR);
CHAR* InlineeName_full_name = InlineeName_PS.OpenStringBuffer(InlineeName_full_name_path_size );
if (InlineeName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT InlineeNameSignature_path_size = -1;
PathCharString InlineeNameSignature_PS;
INT InlineeNameSignature_full_name_path_size = (PAL_wcslen(InlineeNameSignature) + 1)*sizeof(WCHAR);
CHAR* InlineeNameSignature_full_name = InlineeNameSignature_PS.OpenStringBuffer(InlineeNameSignature_full_name_path_size );
if (InlineeNameSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
MethodBeingCompiledNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, MethodBeingCompiledNamespace, -1, MethodBeingCompiledNamespace_full_name, MethodBeingCompiledNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(MethodBeingCompiledNamespace_path_size < MethodBeingCompiledNamespace_full_name_path_size );
MethodBeingCompiledNamespace_PS.CloseBuffer(MethodBeingCompiledNamespace_path_size );
if( MethodBeingCompiledNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodBeingCompiledName_path_size = WideCharToMultiByte( CP_ACP, 0, MethodBeingCompiledName, -1, MethodBeingCompiledName_full_name, MethodBeingCompiledName_full_name_path_size, NULL, NULL );
_ASSERTE(MethodBeingCompiledName_path_size < MethodBeingCompiledName_full_name_path_size );
MethodBeingCompiledName_PS.CloseBuffer(MethodBeingCompiledName_path_size );
if( MethodBeingCompiledName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodBeingCompiledNameSignature_path_size = WideCharToMultiByte( CP_ACP, 0, MethodBeingCompiledNameSignature, -1, MethodBeingCompiledNameSignature_full_name, MethodBeingCompiledNameSignature_full_name_path_size, NULL, NULL );
_ASSERTE(MethodBeingCompiledNameSignature_path_size < MethodBeingCompiledNameSignature_full_name_path_size );
MethodBeingCompiledNameSignature_PS.CloseBuffer(MethodBeingCompiledNameSignature_path_size );
if( MethodBeingCompiledNameSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
InlinerNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, InlinerNamespace, -1, InlinerNamespace_full_name, InlinerNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(InlinerNamespace_path_size < InlinerNamespace_full_name_path_size );
InlinerNamespace_PS.CloseBuffer(InlinerNamespace_path_size );
if( InlinerNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
InlinerName_path_size = WideCharToMultiByte( CP_ACP, 0, InlinerName, -1, InlinerName_full_name, InlinerName_full_name_path_size, NULL, NULL );
_ASSERTE(InlinerName_path_size < InlinerName_full_name_path_size );
InlinerName_PS.CloseBuffer(InlinerName_path_size );
if( InlinerName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
InlinerNameSignature_path_size = WideCharToMultiByte( CP_ACP, 0, InlinerNameSignature, -1, InlinerNameSignature_full_name, InlinerNameSignature_full_name_path_size, NULL, NULL );
_ASSERTE(InlinerNameSignature_path_size < InlinerNameSignature_full_name_path_size );
InlinerNameSignature_PS.CloseBuffer(InlinerNameSignature_path_size );
if( InlinerNameSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
InlineeNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, InlineeNamespace, -1, InlineeNamespace_full_name, InlineeNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(InlineeNamespace_path_size < InlineeNamespace_full_name_path_size );
InlineeNamespace_PS.CloseBuffer(InlineeNamespace_path_size );
if( InlineeNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
InlineeName_path_size = WideCharToMultiByte( CP_ACP, 0, InlineeName, -1, InlineeName_full_name, InlineeName_full_name_path_size, NULL, NULL );
_ASSERTE(InlineeName_path_size < InlineeName_full_name_path_size );
InlineeName_PS.CloseBuffer(InlineeName_path_size );
if( InlineeName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
InlineeNameSignature_path_size = WideCharToMultiByte( CP_ACP, 0, InlineeNameSignature, -1, InlineeNameSignature_full_name, InlineeNameSignature_full_name_path_size, NULL, NULL );
_ASSERTE(InlineeNameSignature_path_size < InlineeNameSignature_full_name_path_size );
InlineeNameSignature_PS.CloseBuffer(InlineeNameSignature_path_size );
if( InlineeNameSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
MethodJitInliningFailed,
MethodBeingCompiledNamespace_full_name,
MethodBeingCompiledName_full_name,
MethodBeingCompiledNameSignature_full_name,
InlinerNamespace_full_name,
InlinerName_full_name,
InlinerNameSignature_full_name,
InlineeNamespace_full_name,
InlineeName_full_name,
InlineeNameSignature_full_name,
FailAlways
);
tracepoint(
DotNETRuntime,
MethodJitInliningFailed_1,
FailReason,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledMethodJitTailCallSucceeded(){ return TRUE;}
extern "C" ULONG FireEtXplatMethodJitTailCallSucceeded(
PCWSTR MethodBeingCompiledNamespace,
PCWSTR MethodBeingCompiledName,
PCWSTR MethodBeingCompiledNameSignature,
PCWSTR CallerNamespace,
PCWSTR CallerName,
PCWSTR CallerNameSignature,
PCWSTR CalleeNamespace,
PCWSTR CalleeName,
PCWSTR CalleeNameSignature,
const BOOL TailPrefix,
const unsigned int TailCallType,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledMethodJitTailCallSucceeded()){ return ERROR_SUCCESS;}
INT MethodBeingCompiledNamespace_path_size = -1;
PathCharString MethodBeingCompiledNamespace_PS;
INT MethodBeingCompiledNamespace_full_name_path_size = (PAL_wcslen(MethodBeingCompiledNamespace) + 1)*sizeof(WCHAR);
CHAR* MethodBeingCompiledNamespace_full_name = MethodBeingCompiledNamespace_PS.OpenStringBuffer(MethodBeingCompiledNamespace_full_name_path_size );
if (MethodBeingCompiledNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodBeingCompiledName_path_size = -1;
PathCharString MethodBeingCompiledName_PS;
INT MethodBeingCompiledName_full_name_path_size = (PAL_wcslen(MethodBeingCompiledName) + 1)*sizeof(WCHAR);
CHAR* MethodBeingCompiledName_full_name = MethodBeingCompiledName_PS.OpenStringBuffer(MethodBeingCompiledName_full_name_path_size );
if (MethodBeingCompiledName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodBeingCompiledNameSignature_path_size = -1;
PathCharString MethodBeingCompiledNameSignature_PS;
INT MethodBeingCompiledNameSignature_full_name_path_size = (PAL_wcslen(MethodBeingCompiledNameSignature) + 1)*sizeof(WCHAR);
CHAR* MethodBeingCompiledNameSignature_full_name = MethodBeingCompiledNameSignature_PS.OpenStringBuffer(MethodBeingCompiledNameSignature_full_name_path_size );
if (MethodBeingCompiledNameSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT CallerNamespace_path_size = -1;
PathCharString CallerNamespace_PS;
INT CallerNamespace_full_name_path_size = (PAL_wcslen(CallerNamespace) + 1)*sizeof(WCHAR);
CHAR* CallerNamespace_full_name = CallerNamespace_PS.OpenStringBuffer(CallerNamespace_full_name_path_size );
if (CallerNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT CallerName_path_size = -1;
PathCharString CallerName_PS;
INT CallerName_full_name_path_size = (PAL_wcslen(CallerName) + 1)*sizeof(WCHAR);
CHAR* CallerName_full_name = CallerName_PS.OpenStringBuffer(CallerName_full_name_path_size );
if (CallerName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT CallerNameSignature_path_size = -1;
PathCharString CallerNameSignature_PS;
INT CallerNameSignature_full_name_path_size = (PAL_wcslen(CallerNameSignature) + 1)*sizeof(WCHAR);
CHAR* CallerNameSignature_full_name = CallerNameSignature_PS.OpenStringBuffer(CallerNameSignature_full_name_path_size );
if (CallerNameSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT CalleeNamespace_path_size = -1;
PathCharString CalleeNamespace_PS;
INT CalleeNamespace_full_name_path_size = (PAL_wcslen(CalleeNamespace) + 1)*sizeof(WCHAR);
CHAR* CalleeNamespace_full_name = CalleeNamespace_PS.OpenStringBuffer(CalleeNamespace_full_name_path_size );
if (CalleeNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT CalleeName_path_size = -1;
PathCharString CalleeName_PS;
INT CalleeName_full_name_path_size = (PAL_wcslen(CalleeName) + 1)*sizeof(WCHAR);
CHAR* CalleeName_full_name = CalleeName_PS.OpenStringBuffer(CalleeName_full_name_path_size );
if (CalleeName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT CalleeNameSignature_path_size = -1;
PathCharString CalleeNameSignature_PS;
INT CalleeNameSignature_full_name_path_size = (PAL_wcslen(CalleeNameSignature) + 1)*sizeof(WCHAR);
CHAR* CalleeNameSignature_full_name = CalleeNameSignature_PS.OpenStringBuffer(CalleeNameSignature_full_name_path_size );
if (CalleeNameSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
MethodBeingCompiledNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, MethodBeingCompiledNamespace, -1, MethodBeingCompiledNamespace_full_name, MethodBeingCompiledNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(MethodBeingCompiledNamespace_path_size < MethodBeingCompiledNamespace_full_name_path_size );
MethodBeingCompiledNamespace_PS.CloseBuffer(MethodBeingCompiledNamespace_path_size );
if( MethodBeingCompiledNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodBeingCompiledName_path_size = WideCharToMultiByte( CP_ACP, 0, MethodBeingCompiledName, -1, MethodBeingCompiledName_full_name, MethodBeingCompiledName_full_name_path_size, NULL, NULL );
_ASSERTE(MethodBeingCompiledName_path_size < MethodBeingCompiledName_full_name_path_size );
MethodBeingCompiledName_PS.CloseBuffer(MethodBeingCompiledName_path_size );
if( MethodBeingCompiledName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodBeingCompiledNameSignature_path_size = WideCharToMultiByte( CP_ACP, 0, MethodBeingCompiledNameSignature, -1, MethodBeingCompiledNameSignature_full_name, MethodBeingCompiledNameSignature_full_name_path_size, NULL, NULL );
_ASSERTE(MethodBeingCompiledNameSignature_path_size < MethodBeingCompiledNameSignature_full_name_path_size );
MethodBeingCompiledNameSignature_PS.CloseBuffer(MethodBeingCompiledNameSignature_path_size );
if( MethodBeingCompiledNameSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
CallerNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, CallerNamespace, -1, CallerNamespace_full_name, CallerNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(CallerNamespace_path_size < CallerNamespace_full_name_path_size );
CallerNamespace_PS.CloseBuffer(CallerNamespace_path_size );
if( CallerNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
CallerName_path_size = WideCharToMultiByte( CP_ACP, 0, CallerName, -1, CallerName_full_name, CallerName_full_name_path_size, NULL, NULL );
_ASSERTE(CallerName_path_size < CallerName_full_name_path_size );
CallerName_PS.CloseBuffer(CallerName_path_size );
if( CallerName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
CallerNameSignature_path_size = WideCharToMultiByte( CP_ACP, 0, CallerNameSignature, -1, CallerNameSignature_full_name, CallerNameSignature_full_name_path_size, NULL, NULL );
_ASSERTE(CallerNameSignature_path_size < CallerNameSignature_full_name_path_size );
CallerNameSignature_PS.CloseBuffer(CallerNameSignature_path_size );
if( CallerNameSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
CalleeNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, CalleeNamespace, -1, CalleeNamespace_full_name, CalleeNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(CalleeNamespace_path_size < CalleeNamespace_full_name_path_size );
CalleeNamespace_PS.CloseBuffer(CalleeNamespace_path_size );
if( CalleeNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
CalleeName_path_size = WideCharToMultiByte( CP_ACP, 0, CalleeName, -1, CalleeName_full_name, CalleeName_full_name_path_size, NULL, NULL );
_ASSERTE(CalleeName_path_size < CalleeName_full_name_path_size );
CalleeName_PS.CloseBuffer(CalleeName_path_size );
if( CalleeName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
CalleeNameSignature_path_size = WideCharToMultiByte( CP_ACP, 0, CalleeNameSignature, -1, CalleeNameSignature_full_name, CalleeNameSignature_full_name_path_size, NULL, NULL );
_ASSERTE(CalleeNameSignature_path_size < CalleeNameSignature_full_name_path_size );
CalleeNameSignature_PS.CloseBuffer(CalleeNameSignature_path_size );
if( CalleeNameSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
MethodJitTailCallSucceeded,
MethodBeingCompiledNamespace_full_name,
MethodBeingCompiledName_full_name,
MethodBeingCompiledNameSignature_full_name,
CallerNamespace_full_name,
CallerName_full_name,
CallerNameSignature_full_name,
CalleeNamespace_full_name,
CalleeName_full_name,
CalleeNameSignature_full_name,
TailPrefix
);
tracepoint(
DotNETRuntime,
MethodJitTailCallSucceeded_1,
TailCallType,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledMethodJitTailCallFailed(){ return TRUE;}
extern "C" ULONG FireEtXplatMethodJitTailCallFailed(
PCWSTR MethodBeingCompiledNamespace,
PCWSTR MethodBeingCompiledName,
PCWSTR MethodBeingCompiledNameSignature,
PCWSTR CallerNamespace,
PCWSTR CallerName,
PCWSTR CallerNameSignature,
PCWSTR CalleeNamespace,
PCWSTR CalleeName,
PCWSTR CalleeNameSignature,
const BOOL TailPrefix,
LPCSTR FailReason,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledMethodJitTailCallFailed()){ return ERROR_SUCCESS;}
INT MethodBeingCompiledNamespace_path_size = -1;
PathCharString MethodBeingCompiledNamespace_PS;
INT MethodBeingCompiledNamespace_full_name_path_size = (PAL_wcslen(MethodBeingCompiledNamespace) + 1)*sizeof(WCHAR);
CHAR* MethodBeingCompiledNamespace_full_name = MethodBeingCompiledNamespace_PS.OpenStringBuffer(MethodBeingCompiledNamespace_full_name_path_size );
if (MethodBeingCompiledNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodBeingCompiledName_path_size = -1;
PathCharString MethodBeingCompiledName_PS;
INT MethodBeingCompiledName_full_name_path_size = (PAL_wcslen(MethodBeingCompiledName) + 1)*sizeof(WCHAR);
CHAR* MethodBeingCompiledName_full_name = MethodBeingCompiledName_PS.OpenStringBuffer(MethodBeingCompiledName_full_name_path_size );
if (MethodBeingCompiledName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT MethodBeingCompiledNameSignature_path_size = -1;
PathCharString MethodBeingCompiledNameSignature_PS;
INT MethodBeingCompiledNameSignature_full_name_path_size = (PAL_wcslen(MethodBeingCompiledNameSignature) + 1)*sizeof(WCHAR);
CHAR* MethodBeingCompiledNameSignature_full_name = MethodBeingCompiledNameSignature_PS.OpenStringBuffer(MethodBeingCompiledNameSignature_full_name_path_size );
if (MethodBeingCompiledNameSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT CallerNamespace_path_size = -1;
PathCharString CallerNamespace_PS;
INT CallerNamespace_full_name_path_size = (PAL_wcslen(CallerNamespace) + 1)*sizeof(WCHAR);
CHAR* CallerNamespace_full_name = CallerNamespace_PS.OpenStringBuffer(CallerNamespace_full_name_path_size );
if (CallerNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT CallerName_path_size = -1;
PathCharString CallerName_PS;
INT CallerName_full_name_path_size = (PAL_wcslen(CallerName) + 1)*sizeof(WCHAR);
CHAR* CallerName_full_name = CallerName_PS.OpenStringBuffer(CallerName_full_name_path_size );
if (CallerName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT CallerNameSignature_path_size = -1;
PathCharString CallerNameSignature_PS;
INT CallerNameSignature_full_name_path_size = (PAL_wcslen(CallerNameSignature) + 1)*sizeof(WCHAR);
CHAR* CallerNameSignature_full_name = CallerNameSignature_PS.OpenStringBuffer(CallerNameSignature_full_name_path_size );
if (CallerNameSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT CalleeNamespace_path_size = -1;
PathCharString CalleeNamespace_PS;
INT CalleeNamespace_full_name_path_size = (PAL_wcslen(CalleeNamespace) + 1)*sizeof(WCHAR);
CHAR* CalleeNamespace_full_name = CalleeNamespace_PS.OpenStringBuffer(CalleeNamespace_full_name_path_size );
if (CalleeNamespace_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT CalleeName_path_size = -1;
PathCharString CalleeName_PS;
INT CalleeName_full_name_path_size = (PAL_wcslen(CalleeName) + 1)*sizeof(WCHAR);
CHAR* CalleeName_full_name = CalleeName_PS.OpenStringBuffer(CalleeName_full_name_path_size );
if (CalleeName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT CalleeNameSignature_path_size = -1;
PathCharString CalleeNameSignature_PS;
INT CalleeNameSignature_full_name_path_size = (PAL_wcslen(CalleeNameSignature) + 1)*sizeof(WCHAR);
CHAR* CalleeNameSignature_full_name = CalleeNameSignature_PS.OpenStringBuffer(CalleeNameSignature_full_name_path_size );
if (CalleeNameSignature_full_name == NULL ) { return ERROR_WRITE_FAULT; }
MethodBeingCompiledNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, MethodBeingCompiledNamespace, -1, MethodBeingCompiledNamespace_full_name, MethodBeingCompiledNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(MethodBeingCompiledNamespace_path_size < MethodBeingCompiledNamespace_full_name_path_size );
MethodBeingCompiledNamespace_PS.CloseBuffer(MethodBeingCompiledNamespace_path_size );
if( MethodBeingCompiledNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodBeingCompiledName_path_size = WideCharToMultiByte( CP_ACP, 0, MethodBeingCompiledName, -1, MethodBeingCompiledName_full_name, MethodBeingCompiledName_full_name_path_size, NULL, NULL );
_ASSERTE(MethodBeingCompiledName_path_size < MethodBeingCompiledName_full_name_path_size );
MethodBeingCompiledName_PS.CloseBuffer(MethodBeingCompiledName_path_size );
if( MethodBeingCompiledName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
MethodBeingCompiledNameSignature_path_size = WideCharToMultiByte( CP_ACP, 0, MethodBeingCompiledNameSignature, -1, MethodBeingCompiledNameSignature_full_name, MethodBeingCompiledNameSignature_full_name_path_size, NULL, NULL );
_ASSERTE(MethodBeingCompiledNameSignature_path_size < MethodBeingCompiledNameSignature_full_name_path_size );
MethodBeingCompiledNameSignature_PS.CloseBuffer(MethodBeingCompiledNameSignature_path_size );
if( MethodBeingCompiledNameSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
CallerNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, CallerNamespace, -1, CallerNamespace_full_name, CallerNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(CallerNamespace_path_size < CallerNamespace_full_name_path_size );
CallerNamespace_PS.CloseBuffer(CallerNamespace_path_size );
if( CallerNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
CallerName_path_size = WideCharToMultiByte( CP_ACP, 0, CallerName, -1, CallerName_full_name, CallerName_full_name_path_size, NULL, NULL );
_ASSERTE(CallerName_path_size < CallerName_full_name_path_size );
CallerName_PS.CloseBuffer(CallerName_path_size );
if( CallerName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
CallerNameSignature_path_size = WideCharToMultiByte( CP_ACP, 0, CallerNameSignature, -1, CallerNameSignature_full_name, CallerNameSignature_full_name_path_size, NULL, NULL );
_ASSERTE(CallerNameSignature_path_size < CallerNameSignature_full_name_path_size );
CallerNameSignature_PS.CloseBuffer(CallerNameSignature_path_size );
if( CallerNameSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
CalleeNamespace_path_size = WideCharToMultiByte( CP_ACP, 0, CalleeNamespace, -1, CalleeNamespace_full_name, CalleeNamespace_full_name_path_size, NULL, NULL );
_ASSERTE(CalleeNamespace_path_size < CalleeNamespace_full_name_path_size );
CalleeNamespace_PS.CloseBuffer(CalleeNamespace_path_size );
if( CalleeNamespace_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
CalleeName_path_size = WideCharToMultiByte( CP_ACP, 0, CalleeName, -1, CalleeName_full_name, CalleeName_full_name_path_size, NULL, NULL );
_ASSERTE(CalleeName_path_size < CalleeName_full_name_path_size );
CalleeName_PS.CloseBuffer(CalleeName_path_size );
if( CalleeName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
CalleeNameSignature_path_size = WideCharToMultiByte( CP_ACP, 0, CalleeNameSignature, -1, CalleeNameSignature_full_name, CalleeNameSignature_full_name_path_size, NULL, NULL );
_ASSERTE(CalleeNameSignature_path_size < CalleeNameSignature_full_name_path_size );
CalleeNameSignature_PS.CloseBuffer(CalleeNameSignature_path_size );
if( CalleeNameSignature_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
MethodJitTailCallFailed,
MethodBeingCompiledNamespace_full_name,
MethodBeingCompiledName_full_name,
MethodBeingCompiledNameSignature_full_name,
CallerNamespace_full_name,
CallerName_full_name,
CallerNameSignature_full_name,
CalleeNamespace_full_name,
CalleeName_full_name,
CalleeNameSignature_full_name,
TailPrefix
);
tracepoint(
DotNETRuntime,
MethodJitTailCallFailed_1,
FailReason,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledMethodILToNativeMap(){ return TRUE;}
extern "C" ULONG FireEtXplatMethodILToNativeMap(
const unsigned __int64 MethodID,
const unsigned __int64 ReJITID,
const unsigned char MethodExtent,
const unsigned short CountOfMapEntries,
const unsigned int* ILOffsets,
const unsigned int* NativeOffsets,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledMethodILToNativeMap()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
MethodILToNativeMap,
MethodID,
ReJITID,
MethodExtent,
CountOfMapEntries,
(const unsigned int*) ILOffsets,
(const unsigned int*) NativeOffsets,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledModuleDCStartV2(){ return TRUE;}
extern "C" ULONG FireEtXplatModuleDCStartV2(
const unsigned __int64 ModuleID,
const unsigned __int64 AssemblyID,
const unsigned int ModuleFlags,
const unsigned int Reserved1,
PCWSTR ModuleILPath,
PCWSTR ModuleNativePath
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledModuleDCStartV2()){ return ERROR_SUCCESS;}
INT ModuleILPath_path_size = -1;
PathCharString ModuleILPath_PS;
INT ModuleILPath_full_name_path_size = (PAL_wcslen(ModuleILPath) + 1)*sizeof(WCHAR);
CHAR* ModuleILPath_full_name = ModuleILPath_PS.OpenStringBuffer(ModuleILPath_full_name_path_size );
if (ModuleILPath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT ModuleNativePath_path_size = -1;
PathCharString ModuleNativePath_PS;
INT ModuleNativePath_full_name_path_size = (PAL_wcslen(ModuleNativePath) + 1)*sizeof(WCHAR);
CHAR* ModuleNativePath_full_name = ModuleNativePath_PS.OpenStringBuffer(ModuleNativePath_full_name_path_size );
if (ModuleNativePath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ModuleILPath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleILPath, -1, ModuleILPath_full_name, ModuleILPath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleILPath_path_size < ModuleILPath_full_name_path_size );
ModuleILPath_PS.CloseBuffer(ModuleILPath_path_size );
if( ModuleILPath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
ModuleNativePath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleNativePath, -1, ModuleNativePath_full_name, ModuleNativePath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleNativePath_path_size < ModuleNativePath_full_name_path_size );
ModuleNativePath_PS.CloseBuffer(ModuleNativePath_path_size );
if( ModuleNativePath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
ModuleDCStartV2,
ModuleID,
AssemblyID,
ModuleFlags,
Reserved1,
ModuleILPath_full_name,
ModuleNativePath_full_name
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledModuleDCEndV2(){ return TRUE;}
extern "C" ULONG FireEtXplatModuleDCEndV2(
const unsigned __int64 ModuleID,
const unsigned __int64 AssemblyID,
const unsigned int ModuleFlags,
const unsigned int Reserved1,
PCWSTR ModuleILPath,
PCWSTR ModuleNativePath
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledModuleDCEndV2()){ return ERROR_SUCCESS;}
INT ModuleILPath_path_size = -1;
PathCharString ModuleILPath_PS;
INT ModuleILPath_full_name_path_size = (PAL_wcslen(ModuleILPath) + 1)*sizeof(WCHAR);
CHAR* ModuleILPath_full_name = ModuleILPath_PS.OpenStringBuffer(ModuleILPath_full_name_path_size );
if (ModuleILPath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT ModuleNativePath_path_size = -1;
PathCharString ModuleNativePath_PS;
INT ModuleNativePath_full_name_path_size = (PAL_wcslen(ModuleNativePath) + 1)*sizeof(WCHAR);
CHAR* ModuleNativePath_full_name = ModuleNativePath_PS.OpenStringBuffer(ModuleNativePath_full_name_path_size );
if (ModuleNativePath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ModuleILPath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleILPath, -1, ModuleILPath_full_name, ModuleILPath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleILPath_path_size < ModuleILPath_full_name_path_size );
ModuleILPath_PS.CloseBuffer(ModuleILPath_path_size );
if( ModuleILPath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
ModuleNativePath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleNativePath, -1, ModuleNativePath_full_name, ModuleNativePath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleNativePath_path_size < ModuleNativePath_full_name_path_size );
ModuleNativePath_PS.CloseBuffer(ModuleNativePath_path_size );
if( ModuleNativePath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
ModuleDCEndV2,
ModuleID,
AssemblyID,
ModuleFlags,
Reserved1,
ModuleILPath_full_name,
ModuleNativePath_full_name
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledDomainModuleLoad(){ return TRUE;}
extern "C" ULONG FireEtXplatDomainModuleLoad(
const unsigned __int64 ModuleID,
const unsigned __int64 AssemblyID,
const unsigned __int64 AppDomainID,
const unsigned int ModuleFlags,
const unsigned int Reserved1,
PCWSTR ModuleILPath,
PCWSTR ModuleNativePath
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledDomainModuleLoad()){ return ERROR_SUCCESS;}
INT ModuleILPath_path_size = -1;
PathCharString ModuleILPath_PS;
INT ModuleILPath_full_name_path_size = (PAL_wcslen(ModuleILPath) + 1)*sizeof(WCHAR);
CHAR* ModuleILPath_full_name = ModuleILPath_PS.OpenStringBuffer(ModuleILPath_full_name_path_size );
if (ModuleILPath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT ModuleNativePath_path_size = -1;
PathCharString ModuleNativePath_PS;
INT ModuleNativePath_full_name_path_size = (PAL_wcslen(ModuleNativePath) + 1)*sizeof(WCHAR);
CHAR* ModuleNativePath_full_name = ModuleNativePath_PS.OpenStringBuffer(ModuleNativePath_full_name_path_size );
if (ModuleNativePath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ModuleILPath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleILPath, -1, ModuleILPath_full_name, ModuleILPath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleILPath_path_size < ModuleILPath_full_name_path_size );
ModuleILPath_PS.CloseBuffer(ModuleILPath_path_size );
if( ModuleILPath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
ModuleNativePath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleNativePath, -1, ModuleNativePath_full_name, ModuleNativePath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleNativePath_path_size < ModuleNativePath_full_name_path_size );
ModuleNativePath_PS.CloseBuffer(ModuleNativePath_path_size );
if( ModuleNativePath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
DomainModuleLoad,
ModuleID,
AssemblyID,
AppDomainID,
ModuleFlags,
Reserved1,
ModuleILPath_full_name,
ModuleNativePath_full_name
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledDomainModuleLoad_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatDomainModuleLoad_V1(
const unsigned __int64 ModuleID,
const unsigned __int64 AssemblyID,
const unsigned __int64 AppDomainID,
const unsigned int ModuleFlags,
const unsigned int Reserved1,
PCWSTR ModuleILPath,
PCWSTR ModuleNativePath,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledDomainModuleLoad_V1()){ return ERROR_SUCCESS;}
INT ModuleILPath_path_size = -1;
PathCharString ModuleILPath_PS;
INT ModuleILPath_full_name_path_size = (PAL_wcslen(ModuleILPath) + 1)*sizeof(WCHAR);
CHAR* ModuleILPath_full_name = ModuleILPath_PS.OpenStringBuffer(ModuleILPath_full_name_path_size );
if (ModuleILPath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT ModuleNativePath_path_size = -1;
PathCharString ModuleNativePath_PS;
INT ModuleNativePath_full_name_path_size = (PAL_wcslen(ModuleNativePath) + 1)*sizeof(WCHAR);
CHAR* ModuleNativePath_full_name = ModuleNativePath_PS.OpenStringBuffer(ModuleNativePath_full_name_path_size );
if (ModuleNativePath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ModuleILPath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleILPath, -1, ModuleILPath_full_name, ModuleILPath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleILPath_path_size < ModuleILPath_full_name_path_size );
ModuleILPath_PS.CloseBuffer(ModuleILPath_path_size );
if( ModuleILPath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
ModuleNativePath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleNativePath, -1, ModuleNativePath_full_name, ModuleNativePath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleNativePath_path_size < ModuleNativePath_full_name_path_size );
ModuleNativePath_PS.CloseBuffer(ModuleNativePath_path_size );
if( ModuleNativePath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
DomainModuleLoad_V1,
ModuleID,
AssemblyID,
AppDomainID,
ModuleFlags,
Reserved1,
ModuleILPath_full_name,
ModuleNativePath_full_name,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledModuleLoad(){ return TRUE;}
extern "C" ULONG FireEtXplatModuleLoad(
const unsigned __int64 ModuleID,
const unsigned __int64 AssemblyID,
const unsigned int ModuleFlags,
const unsigned int Reserved1,
PCWSTR ModuleILPath,
PCWSTR ModuleNativePath
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledModuleLoad()){ return ERROR_SUCCESS;}
INT ModuleILPath_path_size = -1;
PathCharString ModuleILPath_PS;
INT ModuleILPath_full_name_path_size = (PAL_wcslen(ModuleILPath) + 1)*sizeof(WCHAR);
CHAR* ModuleILPath_full_name = ModuleILPath_PS.OpenStringBuffer(ModuleILPath_full_name_path_size );
if (ModuleILPath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT ModuleNativePath_path_size = -1;
PathCharString ModuleNativePath_PS;
INT ModuleNativePath_full_name_path_size = (PAL_wcslen(ModuleNativePath) + 1)*sizeof(WCHAR);
CHAR* ModuleNativePath_full_name = ModuleNativePath_PS.OpenStringBuffer(ModuleNativePath_full_name_path_size );
if (ModuleNativePath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ModuleILPath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleILPath, -1, ModuleILPath_full_name, ModuleILPath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleILPath_path_size < ModuleILPath_full_name_path_size );
ModuleILPath_PS.CloseBuffer(ModuleILPath_path_size );
if( ModuleILPath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
ModuleNativePath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleNativePath, -1, ModuleNativePath_full_name, ModuleNativePath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleNativePath_path_size < ModuleNativePath_full_name_path_size );
ModuleNativePath_PS.CloseBuffer(ModuleNativePath_path_size );
if( ModuleNativePath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
ModuleLoad,
ModuleID,
AssemblyID,
ModuleFlags,
Reserved1,
ModuleILPath_full_name,
ModuleNativePath_full_name
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledModuleLoad_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatModuleLoad_V1(
const unsigned __int64 ModuleID,
const unsigned __int64 AssemblyID,
const unsigned int ModuleFlags,
const unsigned int Reserved1,
PCWSTR ModuleILPath,
PCWSTR ModuleNativePath,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledModuleLoad_V1()){ return ERROR_SUCCESS;}
INT ModuleILPath_path_size = -1;
PathCharString ModuleILPath_PS;
INT ModuleILPath_full_name_path_size = (PAL_wcslen(ModuleILPath) + 1)*sizeof(WCHAR);
CHAR* ModuleILPath_full_name = ModuleILPath_PS.OpenStringBuffer(ModuleILPath_full_name_path_size );
if (ModuleILPath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT ModuleNativePath_path_size = -1;
PathCharString ModuleNativePath_PS;
INT ModuleNativePath_full_name_path_size = (PAL_wcslen(ModuleNativePath) + 1)*sizeof(WCHAR);
CHAR* ModuleNativePath_full_name = ModuleNativePath_PS.OpenStringBuffer(ModuleNativePath_full_name_path_size );
if (ModuleNativePath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ModuleILPath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleILPath, -1, ModuleILPath_full_name, ModuleILPath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleILPath_path_size < ModuleILPath_full_name_path_size );
ModuleILPath_PS.CloseBuffer(ModuleILPath_path_size );
if( ModuleILPath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
ModuleNativePath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleNativePath, -1, ModuleNativePath_full_name, ModuleNativePath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleNativePath_path_size < ModuleNativePath_full_name_path_size );
ModuleNativePath_PS.CloseBuffer(ModuleNativePath_path_size );
if( ModuleNativePath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
ModuleLoad_V1,
ModuleID,
AssemblyID,
ModuleFlags,
Reserved1,
ModuleILPath_full_name,
ModuleNativePath_full_name,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledModuleLoad_V2(){ return TRUE;}
extern "C" ULONG FireEtXplatModuleLoad_V2(
const unsigned __int64 ModuleID,
const unsigned __int64 AssemblyID,
const unsigned int ModuleFlags,
const unsigned int Reserved1,
PCWSTR ModuleILPath,
PCWSTR ModuleNativePath,
const unsigned short ClrInstanceID,
const GUID* ManagedPdbSignature,
const unsigned int ManagedPdbAge,
PCWSTR ManagedPdbBuildPath,
const GUID* NativePdbSignature,
const unsigned int NativePdbAge,
PCWSTR NativePdbBuildPath
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledModuleLoad_V2()){ return ERROR_SUCCESS;}
INT ModuleILPath_path_size = -1;
PathCharString ModuleILPath_PS;
INT ModuleILPath_full_name_path_size = (PAL_wcslen(ModuleILPath) + 1)*sizeof(WCHAR);
CHAR* ModuleILPath_full_name = ModuleILPath_PS.OpenStringBuffer(ModuleILPath_full_name_path_size );
if (ModuleILPath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT ModuleNativePath_path_size = -1;
PathCharString ModuleNativePath_PS;
INT ModuleNativePath_full_name_path_size = (PAL_wcslen(ModuleNativePath) + 1)*sizeof(WCHAR);
CHAR* ModuleNativePath_full_name = ModuleNativePath_PS.OpenStringBuffer(ModuleNativePath_full_name_path_size );
if (ModuleNativePath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT ManagedPdbBuildPath_path_size = -1;
PathCharString ManagedPdbBuildPath_PS;
INT ManagedPdbBuildPath_full_name_path_size = (PAL_wcslen(ManagedPdbBuildPath) + 1)*sizeof(WCHAR);
CHAR* ManagedPdbBuildPath_full_name = ManagedPdbBuildPath_PS.OpenStringBuffer(ManagedPdbBuildPath_full_name_path_size );
if (ManagedPdbBuildPath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT NativePdbBuildPath_path_size = -1;
PathCharString NativePdbBuildPath_PS;
INT NativePdbBuildPath_full_name_path_size = (PAL_wcslen(NativePdbBuildPath) + 1)*sizeof(WCHAR);
CHAR* NativePdbBuildPath_full_name = NativePdbBuildPath_PS.OpenStringBuffer(NativePdbBuildPath_full_name_path_size );
if (NativePdbBuildPath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ModuleILPath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleILPath, -1, ModuleILPath_full_name, ModuleILPath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleILPath_path_size < ModuleILPath_full_name_path_size );
ModuleILPath_PS.CloseBuffer(ModuleILPath_path_size );
if( ModuleILPath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
ModuleNativePath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleNativePath, -1, ModuleNativePath_full_name, ModuleNativePath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleNativePath_path_size < ModuleNativePath_full_name_path_size );
ModuleNativePath_PS.CloseBuffer(ModuleNativePath_path_size );
if( ModuleNativePath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
ManagedPdbBuildPath_path_size = WideCharToMultiByte( CP_ACP, 0, ManagedPdbBuildPath, -1, ManagedPdbBuildPath_full_name, ManagedPdbBuildPath_full_name_path_size, NULL, NULL );
_ASSERTE(ManagedPdbBuildPath_path_size < ManagedPdbBuildPath_full_name_path_size );
ManagedPdbBuildPath_PS.CloseBuffer(ManagedPdbBuildPath_path_size );
if( ManagedPdbBuildPath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
NativePdbBuildPath_path_size = WideCharToMultiByte( CP_ACP, 0, NativePdbBuildPath, -1, NativePdbBuildPath_full_name, NativePdbBuildPath_full_name_path_size, NULL, NULL );
_ASSERTE(NativePdbBuildPath_path_size < NativePdbBuildPath_full_name_path_size );
NativePdbBuildPath_PS.CloseBuffer(NativePdbBuildPath_path_size );
if( NativePdbBuildPath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
ModuleLoad_V2,
ModuleID,
AssemblyID,
ModuleFlags,
Reserved1,
ModuleILPath_full_name,
ModuleNativePath_full_name,
ClrInstanceID,
(const int*) ManagedPdbSignature,
ManagedPdbAge,
ManagedPdbBuildPath_full_name
);
tracepoint(
DotNETRuntime,
ModuleLoad_V2_1,
(const int*) NativePdbSignature,
NativePdbAge,
NativePdbBuildPath_full_name
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledModuleUnload(){ return TRUE;}
extern "C" ULONG FireEtXplatModuleUnload(
const unsigned __int64 ModuleID,
const unsigned __int64 AssemblyID,
const unsigned int ModuleFlags,
const unsigned int Reserved1,
PCWSTR ModuleILPath,
PCWSTR ModuleNativePath
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledModuleUnload()){ return ERROR_SUCCESS;}
INT ModuleILPath_path_size = -1;
PathCharString ModuleILPath_PS;
INT ModuleILPath_full_name_path_size = (PAL_wcslen(ModuleILPath) + 1)*sizeof(WCHAR);
CHAR* ModuleILPath_full_name = ModuleILPath_PS.OpenStringBuffer(ModuleILPath_full_name_path_size );
if (ModuleILPath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT ModuleNativePath_path_size = -1;
PathCharString ModuleNativePath_PS;
INT ModuleNativePath_full_name_path_size = (PAL_wcslen(ModuleNativePath) + 1)*sizeof(WCHAR);
CHAR* ModuleNativePath_full_name = ModuleNativePath_PS.OpenStringBuffer(ModuleNativePath_full_name_path_size );
if (ModuleNativePath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ModuleILPath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleILPath, -1, ModuleILPath_full_name, ModuleILPath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleILPath_path_size < ModuleILPath_full_name_path_size );
ModuleILPath_PS.CloseBuffer(ModuleILPath_path_size );
if( ModuleILPath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
ModuleNativePath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleNativePath, -1, ModuleNativePath_full_name, ModuleNativePath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleNativePath_path_size < ModuleNativePath_full_name_path_size );
ModuleNativePath_PS.CloseBuffer(ModuleNativePath_path_size );
if( ModuleNativePath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
ModuleUnload,
ModuleID,
AssemblyID,
ModuleFlags,
Reserved1,
ModuleILPath_full_name,
ModuleNativePath_full_name
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledModuleUnload_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatModuleUnload_V1(
const unsigned __int64 ModuleID,
const unsigned __int64 AssemblyID,
const unsigned int ModuleFlags,
const unsigned int Reserved1,
PCWSTR ModuleILPath,
PCWSTR ModuleNativePath,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledModuleUnload_V1()){ return ERROR_SUCCESS;}
INT ModuleILPath_path_size = -1;
PathCharString ModuleILPath_PS;
INT ModuleILPath_full_name_path_size = (PAL_wcslen(ModuleILPath) + 1)*sizeof(WCHAR);
CHAR* ModuleILPath_full_name = ModuleILPath_PS.OpenStringBuffer(ModuleILPath_full_name_path_size );
if (ModuleILPath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT ModuleNativePath_path_size = -1;
PathCharString ModuleNativePath_PS;
INT ModuleNativePath_full_name_path_size = (PAL_wcslen(ModuleNativePath) + 1)*sizeof(WCHAR);
CHAR* ModuleNativePath_full_name = ModuleNativePath_PS.OpenStringBuffer(ModuleNativePath_full_name_path_size );
if (ModuleNativePath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ModuleILPath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleILPath, -1, ModuleILPath_full_name, ModuleILPath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleILPath_path_size < ModuleILPath_full_name_path_size );
ModuleILPath_PS.CloseBuffer(ModuleILPath_path_size );
if( ModuleILPath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
ModuleNativePath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleNativePath, -1, ModuleNativePath_full_name, ModuleNativePath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleNativePath_path_size < ModuleNativePath_full_name_path_size );
ModuleNativePath_PS.CloseBuffer(ModuleNativePath_path_size );
if( ModuleNativePath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
ModuleUnload_V1,
ModuleID,
AssemblyID,
ModuleFlags,
Reserved1,
ModuleILPath_full_name,
ModuleNativePath_full_name,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledModuleUnload_V2(){ return TRUE;}
extern "C" ULONG FireEtXplatModuleUnload_V2(
const unsigned __int64 ModuleID,
const unsigned __int64 AssemblyID,
const unsigned int ModuleFlags,
const unsigned int Reserved1,
PCWSTR ModuleILPath,
PCWSTR ModuleNativePath,
const unsigned short ClrInstanceID,
const GUID* ManagedPdbSignature,
const unsigned int ManagedPdbAge,
PCWSTR ManagedPdbBuildPath,
const GUID* NativePdbSignature,
const unsigned int NativePdbAge,
PCWSTR NativePdbBuildPath
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledModuleUnload_V2()){ return ERROR_SUCCESS;}
INT ModuleILPath_path_size = -1;
PathCharString ModuleILPath_PS;
INT ModuleILPath_full_name_path_size = (PAL_wcslen(ModuleILPath) + 1)*sizeof(WCHAR);
CHAR* ModuleILPath_full_name = ModuleILPath_PS.OpenStringBuffer(ModuleILPath_full_name_path_size );
if (ModuleILPath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT ModuleNativePath_path_size = -1;
PathCharString ModuleNativePath_PS;
INT ModuleNativePath_full_name_path_size = (PAL_wcslen(ModuleNativePath) + 1)*sizeof(WCHAR);
CHAR* ModuleNativePath_full_name = ModuleNativePath_PS.OpenStringBuffer(ModuleNativePath_full_name_path_size );
if (ModuleNativePath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT ManagedPdbBuildPath_path_size = -1;
PathCharString ManagedPdbBuildPath_PS;
INT ManagedPdbBuildPath_full_name_path_size = (PAL_wcslen(ManagedPdbBuildPath) + 1)*sizeof(WCHAR);
CHAR* ManagedPdbBuildPath_full_name = ManagedPdbBuildPath_PS.OpenStringBuffer(ManagedPdbBuildPath_full_name_path_size );
if (ManagedPdbBuildPath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT NativePdbBuildPath_path_size = -1;
PathCharString NativePdbBuildPath_PS;
INT NativePdbBuildPath_full_name_path_size = (PAL_wcslen(NativePdbBuildPath) + 1)*sizeof(WCHAR);
CHAR* NativePdbBuildPath_full_name = NativePdbBuildPath_PS.OpenStringBuffer(NativePdbBuildPath_full_name_path_size );
if (NativePdbBuildPath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ModuleILPath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleILPath, -1, ModuleILPath_full_name, ModuleILPath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleILPath_path_size < ModuleILPath_full_name_path_size );
ModuleILPath_PS.CloseBuffer(ModuleILPath_path_size );
if( ModuleILPath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
ModuleNativePath_path_size = WideCharToMultiByte( CP_ACP, 0, ModuleNativePath, -1, ModuleNativePath_full_name, ModuleNativePath_full_name_path_size, NULL, NULL );
_ASSERTE(ModuleNativePath_path_size < ModuleNativePath_full_name_path_size );
ModuleNativePath_PS.CloseBuffer(ModuleNativePath_path_size );
if( ModuleNativePath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
ManagedPdbBuildPath_path_size = WideCharToMultiByte( CP_ACP, 0, ManagedPdbBuildPath, -1, ManagedPdbBuildPath_full_name, ManagedPdbBuildPath_full_name_path_size, NULL, NULL );
_ASSERTE(ManagedPdbBuildPath_path_size < ManagedPdbBuildPath_full_name_path_size );
ManagedPdbBuildPath_PS.CloseBuffer(ManagedPdbBuildPath_path_size );
if( ManagedPdbBuildPath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
NativePdbBuildPath_path_size = WideCharToMultiByte( CP_ACP, 0, NativePdbBuildPath, -1, NativePdbBuildPath_full_name, NativePdbBuildPath_full_name_path_size, NULL, NULL );
_ASSERTE(NativePdbBuildPath_path_size < NativePdbBuildPath_full_name_path_size );
NativePdbBuildPath_PS.CloseBuffer(NativePdbBuildPath_path_size );
if( NativePdbBuildPath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
ModuleUnload_V2,
ModuleID,
AssemblyID,
ModuleFlags,
Reserved1,
ModuleILPath_full_name,
ModuleNativePath_full_name,
ClrInstanceID,
(const int*) ManagedPdbSignature,
ManagedPdbAge,
ManagedPdbBuildPath_full_name
);
tracepoint(
DotNETRuntime,
ModuleUnload_V2_1,
(const int*) NativePdbSignature,
NativePdbAge,
NativePdbBuildPath_full_name
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledAssemblyLoad(){ return TRUE;}
extern "C" ULONG FireEtXplatAssemblyLoad(
const unsigned __int64 AssemblyID,
const unsigned __int64 AppDomainID,
const unsigned int AssemblyFlags,
PCWSTR FullyQualifiedAssemblyName
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledAssemblyLoad()){ return ERROR_SUCCESS;}
INT FullyQualifiedAssemblyName_path_size = -1;
PathCharString FullyQualifiedAssemblyName_PS;
INT FullyQualifiedAssemblyName_full_name_path_size = (PAL_wcslen(FullyQualifiedAssemblyName) + 1)*sizeof(WCHAR);
CHAR* FullyQualifiedAssemblyName_full_name = FullyQualifiedAssemblyName_PS.OpenStringBuffer(FullyQualifiedAssemblyName_full_name_path_size );
if (FullyQualifiedAssemblyName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
FullyQualifiedAssemblyName_path_size = WideCharToMultiByte( CP_ACP, 0, FullyQualifiedAssemblyName, -1, FullyQualifiedAssemblyName_full_name, FullyQualifiedAssemblyName_full_name_path_size, NULL, NULL );
_ASSERTE(FullyQualifiedAssemblyName_path_size < FullyQualifiedAssemblyName_full_name_path_size );
FullyQualifiedAssemblyName_PS.CloseBuffer(FullyQualifiedAssemblyName_path_size );
if( FullyQualifiedAssemblyName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
AssemblyLoad,
AssemblyID,
AppDomainID,
AssemblyFlags,
FullyQualifiedAssemblyName_full_name
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledAssemblyLoad_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatAssemblyLoad_V1(
const unsigned __int64 AssemblyID,
const unsigned __int64 AppDomainID,
const unsigned __int64 BindingID,
const unsigned int AssemblyFlags,
PCWSTR FullyQualifiedAssemblyName,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledAssemblyLoad_V1()){ return ERROR_SUCCESS;}
INT FullyQualifiedAssemblyName_path_size = -1;
PathCharString FullyQualifiedAssemblyName_PS;
INT FullyQualifiedAssemblyName_full_name_path_size = (PAL_wcslen(FullyQualifiedAssemblyName) + 1)*sizeof(WCHAR);
CHAR* FullyQualifiedAssemblyName_full_name = FullyQualifiedAssemblyName_PS.OpenStringBuffer(FullyQualifiedAssemblyName_full_name_path_size );
if (FullyQualifiedAssemblyName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
FullyQualifiedAssemblyName_path_size = WideCharToMultiByte( CP_ACP, 0, FullyQualifiedAssemblyName, -1, FullyQualifiedAssemblyName_full_name, FullyQualifiedAssemblyName_full_name_path_size, NULL, NULL );
_ASSERTE(FullyQualifiedAssemblyName_path_size < FullyQualifiedAssemblyName_full_name_path_size );
FullyQualifiedAssemblyName_PS.CloseBuffer(FullyQualifiedAssemblyName_path_size );
if( FullyQualifiedAssemblyName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
AssemblyLoad_V1,
AssemblyID,
AppDomainID,
BindingID,
AssemblyFlags,
FullyQualifiedAssemblyName_full_name,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledAssemblyUnload(){ return TRUE;}
extern "C" ULONG FireEtXplatAssemblyUnload(
const unsigned __int64 AssemblyID,
const unsigned __int64 AppDomainID,
const unsigned int AssemblyFlags,
PCWSTR FullyQualifiedAssemblyName
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledAssemblyUnload()){ return ERROR_SUCCESS;}
INT FullyQualifiedAssemblyName_path_size = -1;
PathCharString FullyQualifiedAssemblyName_PS;
INT FullyQualifiedAssemblyName_full_name_path_size = (PAL_wcslen(FullyQualifiedAssemblyName) + 1)*sizeof(WCHAR);
CHAR* FullyQualifiedAssemblyName_full_name = FullyQualifiedAssemblyName_PS.OpenStringBuffer(FullyQualifiedAssemblyName_full_name_path_size );
if (FullyQualifiedAssemblyName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
FullyQualifiedAssemblyName_path_size = WideCharToMultiByte( CP_ACP, 0, FullyQualifiedAssemblyName, -1, FullyQualifiedAssemblyName_full_name, FullyQualifiedAssemblyName_full_name_path_size, NULL, NULL );
_ASSERTE(FullyQualifiedAssemblyName_path_size < FullyQualifiedAssemblyName_full_name_path_size );
FullyQualifiedAssemblyName_PS.CloseBuffer(FullyQualifiedAssemblyName_path_size );
if( FullyQualifiedAssemblyName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
AssemblyUnload,
AssemblyID,
AppDomainID,
AssemblyFlags,
FullyQualifiedAssemblyName_full_name
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledAssemblyUnload_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatAssemblyUnload_V1(
const unsigned __int64 AssemblyID,
const unsigned __int64 AppDomainID,
const unsigned __int64 BindingID,
const unsigned int AssemblyFlags,
PCWSTR FullyQualifiedAssemblyName,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledAssemblyUnload_V1()){ return ERROR_SUCCESS;}
INT FullyQualifiedAssemblyName_path_size = -1;
PathCharString FullyQualifiedAssemblyName_PS;
INT FullyQualifiedAssemblyName_full_name_path_size = (PAL_wcslen(FullyQualifiedAssemblyName) + 1)*sizeof(WCHAR);
CHAR* FullyQualifiedAssemblyName_full_name = FullyQualifiedAssemblyName_PS.OpenStringBuffer(FullyQualifiedAssemblyName_full_name_path_size );
if (FullyQualifiedAssemblyName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
FullyQualifiedAssemblyName_path_size = WideCharToMultiByte( CP_ACP, 0, FullyQualifiedAssemblyName, -1, FullyQualifiedAssemblyName_full_name, FullyQualifiedAssemblyName_full_name_path_size, NULL, NULL );
_ASSERTE(FullyQualifiedAssemblyName_path_size < FullyQualifiedAssemblyName_full_name_path_size );
FullyQualifiedAssemblyName_PS.CloseBuffer(FullyQualifiedAssemblyName_path_size );
if( FullyQualifiedAssemblyName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
AssemblyUnload_V1,
AssemblyID,
AppDomainID,
BindingID,
AssemblyFlags,
FullyQualifiedAssemblyName_full_name,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledAppDomainLoad(){ return TRUE;}
extern "C" ULONG FireEtXplatAppDomainLoad(
const unsigned __int64 AppDomainID,
const unsigned int AppDomainFlags,
PCWSTR AppDomainName
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledAppDomainLoad()){ return ERROR_SUCCESS;}
INT AppDomainName_path_size = -1;
PathCharString AppDomainName_PS;
INT AppDomainName_full_name_path_size = (PAL_wcslen(AppDomainName) + 1)*sizeof(WCHAR);
CHAR* AppDomainName_full_name = AppDomainName_PS.OpenStringBuffer(AppDomainName_full_name_path_size );
if (AppDomainName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
AppDomainName_path_size = WideCharToMultiByte( CP_ACP, 0, AppDomainName, -1, AppDomainName_full_name, AppDomainName_full_name_path_size, NULL, NULL );
_ASSERTE(AppDomainName_path_size < AppDomainName_full_name_path_size );
AppDomainName_PS.CloseBuffer(AppDomainName_path_size );
if( AppDomainName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
AppDomainLoad,
AppDomainID,
AppDomainFlags,
AppDomainName_full_name
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledAppDomainLoad_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatAppDomainLoad_V1(
const unsigned __int64 AppDomainID,
const unsigned int AppDomainFlags,
PCWSTR AppDomainName,
const unsigned int AppDomainIndex,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledAppDomainLoad_V1()){ return ERROR_SUCCESS;}
INT AppDomainName_path_size = -1;
PathCharString AppDomainName_PS;
INT AppDomainName_full_name_path_size = (PAL_wcslen(AppDomainName) + 1)*sizeof(WCHAR);
CHAR* AppDomainName_full_name = AppDomainName_PS.OpenStringBuffer(AppDomainName_full_name_path_size );
if (AppDomainName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
AppDomainName_path_size = WideCharToMultiByte( CP_ACP, 0, AppDomainName, -1, AppDomainName_full_name, AppDomainName_full_name_path_size, NULL, NULL );
_ASSERTE(AppDomainName_path_size < AppDomainName_full_name_path_size );
AppDomainName_PS.CloseBuffer(AppDomainName_path_size );
if( AppDomainName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
AppDomainLoad_V1,
AppDomainID,
AppDomainFlags,
AppDomainName_full_name,
AppDomainIndex,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledAppDomainUnload(){ return TRUE;}
extern "C" ULONG FireEtXplatAppDomainUnload(
const unsigned __int64 AppDomainID,
const unsigned int AppDomainFlags,
PCWSTR AppDomainName
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledAppDomainUnload()){ return ERROR_SUCCESS;}
INT AppDomainName_path_size = -1;
PathCharString AppDomainName_PS;
INT AppDomainName_full_name_path_size = (PAL_wcslen(AppDomainName) + 1)*sizeof(WCHAR);
CHAR* AppDomainName_full_name = AppDomainName_PS.OpenStringBuffer(AppDomainName_full_name_path_size );
if (AppDomainName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
AppDomainName_path_size = WideCharToMultiByte( CP_ACP, 0, AppDomainName, -1, AppDomainName_full_name, AppDomainName_full_name_path_size, NULL, NULL );
_ASSERTE(AppDomainName_path_size < AppDomainName_full_name_path_size );
AppDomainName_PS.CloseBuffer(AppDomainName_path_size );
if( AppDomainName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
AppDomainUnload,
AppDomainID,
AppDomainFlags,
AppDomainName_full_name
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledAppDomainUnload_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatAppDomainUnload_V1(
const unsigned __int64 AppDomainID,
const unsigned int AppDomainFlags,
PCWSTR AppDomainName,
const unsigned int AppDomainIndex,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledAppDomainUnload_V1()){ return ERROR_SUCCESS;}
INT AppDomainName_path_size = -1;
PathCharString AppDomainName_PS;
INT AppDomainName_full_name_path_size = (PAL_wcslen(AppDomainName) + 1)*sizeof(WCHAR);
CHAR* AppDomainName_full_name = AppDomainName_PS.OpenStringBuffer(AppDomainName_full_name_path_size );
if (AppDomainName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
AppDomainName_path_size = WideCharToMultiByte( CP_ACP, 0, AppDomainName, -1, AppDomainName_full_name, AppDomainName_full_name_path_size, NULL, NULL );
_ASSERTE(AppDomainName_path_size < AppDomainName_full_name_path_size );
AppDomainName_PS.CloseBuffer(AppDomainName_path_size );
if( AppDomainName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
AppDomainUnload_V1,
AppDomainID,
AppDomainFlags,
AppDomainName_full_name,
AppDomainIndex,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledModuleRangeLoad(){ return TRUE;}
extern "C" ULONG FireEtXplatModuleRangeLoad(
const unsigned short ClrInstanceID,
const unsigned __int64 ModuleID,
const unsigned int RangeBegin,
const unsigned int RangeSize,
const unsigned char RangeType
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledModuleRangeLoad()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
ModuleRangeLoad,
ClrInstanceID,
ModuleID,
RangeBegin,
RangeSize,
RangeType
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledStrongNameVerificationStart(){ return TRUE;}
extern "C" ULONG FireEtXplatStrongNameVerificationStart(
const unsigned int VerificationFlags,
const unsigned int ErrorCode,
PCWSTR FullyQualifiedAssemblyName
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledStrongNameVerificationStart()){ return ERROR_SUCCESS;}
INT FullyQualifiedAssemblyName_path_size = -1;
PathCharString FullyQualifiedAssemblyName_PS;
INT FullyQualifiedAssemblyName_full_name_path_size = (PAL_wcslen(FullyQualifiedAssemblyName) + 1)*sizeof(WCHAR);
CHAR* FullyQualifiedAssemblyName_full_name = FullyQualifiedAssemblyName_PS.OpenStringBuffer(FullyQualifiedAssemblyName_full_name_path_size );
if (FullyQualifiedAssemblyName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
FullyQualifiedAssemblyName_path_size = WideCharToMultiByte( CP_ACP, 0, FullyQualifiedAssemblyName, -1, FullyQualifiedAssemblyName_full_name, FullyQualifiedAssemblyName_full_name_path_size, NULL, NULL );
_ASSERTE(FullyQualifiedAssemblyName_path_size < FullyQualifiedAssemblyName_full_name_path_size );
FullyQualifiedAssemblyName_PS.CloseBuffer(FullyQualifiedAssemblyName_path_size );
if( FullyQualifiedAssemblyName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
StrongNameVerificationStart,
VerificationFlags,
ErrorCode,
FullyQualifiedAssemblyName_full_name
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledStrongNameVerificationStart_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatStrongNameVerificationStart_V1(
const unsigned int VerificationFlags,
const unsigned int ErrorCode,
PCWSTR FullyQualifiedAssemblyName,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledStrongNameVerificationStart_V1()){ return ERROR_SUCCESS;}
INT FullyQualifiedAssemblyName_path_size = -1;
PathCharString FullyQualifiedAssemblyName_PS;
INT FullyQualifiedAssemblyName_full_name_path_size = (PAL_wcslen(FullyQualifiedAssemblyName) + 1)*sizeof(WCHAR);
CHAR* FullyQualifiedAssemblyName_full_name = FullyQualifiedAssemblyName_PS.OpenStringBuffer(FullyQualifiedAssemblyName_full_name_path_size );
if (FullyQualifiedAssemblyName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
FullyQualifiedAssemblyName_path_size = WideCharToMultiByte( CP_ACP, 0, FullyQualifiedAssemblyName, -1, FullyQualifiedAssemblyName_full_name, FullyQualifiedAssemblyName_full_name_path_size, NULL, NULL );
_ASSERTE(FullyQualifiedAssemblyName_path_size < FullyQualifiedAssemblyName_full_name_path_size );
FullyQualifiedAssemblyName_PS.CloseBuffer(FullyQualifiedAssemblyName_path_size );
if( FullyQualifiedAssemblyName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
StrongNameVerificationStart_V1,
VerificationFlags,
ErrorCode,
FullyQualifiedAssemblyName_full_name,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledStrongNameVerificationStop(){ return TRUE;}
extern "C" ULONG FireEtXplatStrongNameVerificationStop(
const unsigned int VerificationFlags,
const unsigned int ErrorCode,
PCWSTR FullyQualifiedAssemblyName
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledStrongNameVerificationStop()){ return ERROR_SUCCESS;}
INT FullyQualifiedAssemblyName_path_size = -1;
PathCharString FullyQualifiedAssemblyName_PS;
INT FullyQualifiedAssemblyName_full_name_path_size = (PAL_wcslen(FullyQualifiedAssemblyName) + 1)*sizeof(WCHAR);
CHAR* FullyQualifiedAssemblyName_full_name = FullyQualifiedAssemblyName_PS.OpenStringBuffer(FullyQualifiedAssemblyName_full_name_path_size );
if (FullyQualifiedAssemblyName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
FullyQualifiedAssemblyName_path_size = WideCharToMultiByte( CP_ACP, 0, FullyQualifiedAssemblyName, -1, FullyQualifiedAssemblyName_full_name, FullyQualifiedAssemblyName_full_name_path_size, NULL, NULL );
_ASSERTE(FullyQualifiedAssemblyName_path_size < FullyQualifiedAssemblyName_full_name_path_size );
FullyQualifiedAssemblyName_PS.CloseBuffer(FullyQualifiedAssemblyName_path_size );
if( FullyQualifiedAssemblyName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
StrongNameVerificationStop,
VerificationFlags,
ErrorCode,
FullyQualifiedAssemblyName_full_name
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledStrongNameVerificationStop_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatStrongNameVerificationStop_V1(
const unsigned int VerificationFlags,
const unsigned int ErrorCode,
PCWSTR FullyQualifiedAssemblyName,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledStrongNameVerificationStop_V1()){ return ERROR_SUCCESS;}
INT FullyQualifiedAssemblyName_path_size = -1;
PathCharString FullyQualifiedAssemblyName_PS;
INT FullyQualifiedAssemblyName_full_name_path_size = (PAL_wcslen(FullyQualifiedAssemblyName) + 1)*sizeof(WCHAR);
CHAR* FullyQualifiedAssemblyName_full_name = FullyQualifiedAssemblyName_PS.OpenStringBuffer(FullyQualifiedAssemblyName_full_name_path_size );
if (FullyQualifiedAssemblyName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
FullyQualifiedAssemblyName_path_size = WideCharToMultiByte( CP_ACP, 0, FullyQualifiedAssemblyName, -1, FullyQualifiedAssemblyName_full_name, FullyQualifiedAssemblyName_full_name_path_size, NULL, NULL );
_ASSERTE(FullyQualifiedAssemblyName_path_size < FullyQualifiedAssemblyName_full_name_path_size );
FullyQualifiedAssemblyName_PS.CloseBuffer(FullyQualifiedAssemblyName_path_size );
if( FullyQualifiedAssemblyName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
StrongNameVerificationStop_V1,
VerificationFlags,
ErrorCode,
FullyQualifiedAssemblyName_full_name,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledAuthenticodeVerificationStart(){ return TRUE;}
extern "C" ULONG FireEtXplatAuthenticodeVerificationStart(
const unsigned int VerificationFlags,
const unsigned int ErrorCode,
PCWSTR ModulePath
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledAuthenticodeVerificationStart()){ return ERROR_SUCCESS;}
INT ModulePath_path_size = -1;
PathCharString ModulePath_PS;
INT ModulePath_full_name_path_size = (PAL_wcslen(ModulePath) + 1)*sizeof(WCHAR);
CHAR* ModulePath_full_name = ModulePath_PS.OpenStringBuffer(ModulePath_full_name_path_size );
if (ModulePath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ModulePath_path_size = WideCharToMultiByte( CP_ACP, 0, ModulePath, -1, ModulePath_full_name, ModulePath_full_name_path_size, NULL, NULL );
_ASSERTE(ModulePath_path_size < ModulePath_full_name_path_size );
ModulePath_PS.CloseBuffer(ModulePath_path_size );
if( ModulePath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
AuthenticodeVerificationStart,
VerificationFlags,
ErrorCode,
ModulePath_full_name
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledAuthenticodeVerificationStart_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatAuthenticodeVerificationStart_V1(
const unsigned int VerificationFlags,
const unsigned int ErrorCode,
PCWSTR ModulePath,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledAuthenticodeVerificationStart_V1()){ return ERROR_SUCCESS;}
INT ModulePath_path_size = -1;
PathCharString ModulePath_PS;
INT ModulePath_full_name_path_size = (PAL_wcslen(ModulePath) + 1)*sizeof(WCHAR);
CHAR* ModulePath_full_name = ModulePath_PS.OpenStringBuffer(ModulePath_full_name_path_size );
if (ModulePath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ModulePath_path_size = WideCharToMultiByte( CP_ACP, 0, ModulePath, -1, ModulePath_full_name, ModulePath_full_name_path_size, NULL, NULL );
_ASSERTE(ModulePath_path_size < ModulePath_full_name_path_size );
ModulePath_PS.CloseBuffer(ModulePath_path_size );
if( ModulePath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
AuthenticodeVerificationStart_V1,
VerificationFlags,
ErrorCode,
ModulePath_full_name,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledAuthenticodeVerificationStop(){ return TRUE;}
extern "C" ULONG FireEtXplatAuthenticodeVerificationStop(
const unsigned int VerificationFlags,
const unsigned int ErrorCode,
PCWSTR ModulePath
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledAuthenticodeVerificationStop()){ return ERROR_SUCCESS;}
INT ModulePath_path_size = -1;
PathCharString ModulePath_PS;
INT ModulePath_full_name_path_size = (PAL_wcslen(ModulePath) + 1)*sizeof(WCHAR);
CHAR* ModulePath_full_name = ModulePath_PS.OpenStringBuffer(ModulePath_full_name_path_size );
if (ModulePath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ModulePath_path_size = WideCharToMultiByte( CP_ACP, 0, ModulePath, -1, ModulePath_full_name, ModulePath_full_name_path_size, NULL, NULL );
_ASSERTE(ModulePath_path_size < ModulePath_full_name_path_size );
ModulePath_PS.CloseBuffer(ModulePath_path_size );
if( ModulePath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
AuthenticodeVerificationStop,
VerificationFlags,
ErrorCode,
ModulePath_full_name
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledAuthenticodeVerificationStop_V1(){ return TRUE;}
extern "C" ULONG FireEtXplatAuthenticodeVerificationStop_V1(
const unsigned int VerificationFlags,
const unsigned int ErrorCode,
PCWSTR ModulePath,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledAuthenticodeVerificationStop_V1()){ return ERROR_SUCCESS;}
INT ModulePath_path_size = -1;
PathCharString ModulePath_PS;
INT ModulePath_full_name_path_size = (PAL_wcslen(ModulePath) + 1)*sizeof(WCHAR);
CHAR* ModulePath_full_name = ModulePath_PS.OpenStringBuffer(ModulePath_full_name_path_size );
if (ModulePath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
ModulePath_path_size = WideCharToMultiByte( CP_ACP, 0, ModulePath, -1, ModulePath_full_name, ModulePath_full_name_path_size, NULL, NULL );
_ASSERTE(ModulePath_path_size < ModulePath_full_name_path_size );
ModulePath_PS.CloseBuffer(ModulePath_path_size );
if( ModulePath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
AuthenticodeVerificationStop_V1,
VerificationFlags,
ErrorCode,
ModulePath_full_name,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledRuntimeInformationStart(){ return TRUE;}
extern "C" ULONG FireEtXplatRuntimeInformationStart(
const unsigned short ClrInstanceID,
const unsigned short Sku,
const unsigned short BclMajorVersion,
const unsigned short BclMinorVersion,
const unsigned short BclBuildNumber,
const unsigned short BclQfeNumber,
const unsigned short VMMajorVersion,
const unsigned short VMMinorVersion,
const unsigned short VMBuildNumber,
const unsigned short VMQfeNumber,
const unsigned int StartupFlags,
const unsigned char StartupMode,
PCWSTR CommandLine,
const GUID* ComObjectGuid,
PCWSTR RuntimeDllPath
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledRuntimeInformationStart()){ return ERROR_SUCCESS;}
INT CommandLine_path_size = -1;
PathCharString CommandLine_PS;
INT CommandLine_full_name_path_size = (PAL_wcslen(CommandLine) + 1)*sizeof(WCHAR);
CHAR* CommandLine_full_name = CommandLine_PS.OpenStringBuffer(CommandLine_full_name_path_size );
if (CommandLine_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT RuntimeDllPath_path_size = -1;
PathCharString RuntimeDllPath_PS;
INT RuntimeDllPath_full_name_path_size = (PAL_wcslen(RuntimeDllPath) + 1)*sizeof(WCHAR);
CHAR* RuntimeDllPath_full_name = RuntimeDllPath_PS.OpenStringBuffer(RuntimeDllPath_full_name_path_size );
if (RuntimeDllPath_full_name == NULL ) { return ERROR_WRITE_FAULT; }
CommandLine_path_size = WideCharToMultiByte( CP_ACP, 0, CommandLine, -1, CommandLine_full_name, CommandLine_full_name_path_size, NULL, NULL );
_ASSERTE(CommandLine_path_size < CommandLine_full_name_path_size );
CommandLine_PS.CloseBuffer(CommandLine_path_size );
if( CommandLine_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
RuntimeDllPath_path_size = WideCharToMultiByte( CP_ACP, 0, RuntimeDllPath, -1, RuntimeDllPath_full_name, RuntimeDllPath_full_name_path_size, NULL, NULL );
_ASSERTE(RuntimeDllPath_path_size < RuntimeDllPath_full_name_path_size );
RuntimeDllPath_PS.CloseBuffer(RuntimeDllPath_path_size );
if( RuntimeDllPath_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
RuntimeInformationStart,
ClrInstanceID,
Sku,
BclMajorVersion,
BclMinorVersion,
BclBuildNumber,
BclQfeNumber,
VMMajorVersion,
VMMinorVersion,
VMBuildNumber,
VMQfeNumber
);
tracepoint(
DotNETRuntime,
RuntimeInformationStart_1,
StartupFlags,
StartupMode,
CommandLine_full_name,
(const int*) ComObjectGuid,
RuntimeDllPath_full_name
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledIncreaseMemoryPressure(){ return TRUE;}
extern "C" ULONG FireEtXplatIncreaseMemoryPressure(
const unsigned __int64 BytesAllocated,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledIncreaseMemoryPressure()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
IncreaseMemoryPressure,
BytesAllocated,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledDecreaseMemoryPressure(){ return TRUE;}
extern "C" ULONG FireEtXplatDecreaseMemoryPressure(
const unsigned __int64 BytesFreed,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledDecreaseMemoryPressure()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
DecreaseMemoryPressure,
BytesFreed,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCMarkWithType(){ return TRUE;}
extern "C" ULONG FireEtXplatGCMarkWithType(
const unsigned int HeapNum,
const unsigned short ClrInstanceID,
const unsigned int Type,
const unsigned __int64 Bytes
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCMarkWithType()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCMarkWithType,
HeapNum,
ClrInstanceID,
Type,
Bytes
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCJoin_V2(){ return TRUE;}
extern "C" ULONG FireEtXplatGCJoin_V2(
const unsigned int Heap,
const unsigned int JoinTime,
const unsigned int JoinType,
const unsigned short ClrInstanceID,
const unsigned int JoinID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCJoin_V2()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCJoin_V2,
Heap,
JoinTime,
JoinType,
ClrInstanceID,
JoinID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCPerHeapHistory_V3(){ return TRUE;}
extern "C" ULONG FireEtXplatGCPerHeapHistory_V3(
const unsigned short ClrInstanceID,
const void* FreeListAllocated,
const void* FreeListRejected,
const void* EndOfSegAllocated,
const void* CondemnedAllocated,
const void* PinnedAllocated,
const void* PinnedAllocatedAdvance,
const unsigned int RunningFreeListEfficiency,
const unsigned int CondemnReasons0,
const unsigned int CondemnReasons1,
const unsigned int CompactMechanisms,
const unsigned int ExpandMechanisms,
const unsigned int HeapIndex,
const void* ExtraGen0Commit,
const unsigned int Count,
const ULONG Arg0_Struct_Len_,
const void* Arg0_Struct_Pointer_
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCPerHeapHistory_V3()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCPerHeapHistory_V3,
ClrInstanceID,
(const size_t) FreeListAllocated,
(const size_t) FreeListRejected,
(const size_t) EndOfSegAllocated,
(const size_t) CondemnedAllocated,
(const size_t) PinnedAllocated,
(const size_t) PinnedAllocatedAdvance,
RunningFreeListEfficiency,
CondemnReasons0,
CondemnReasons1
);
tracepoint(
DotNETRuntime,
GCPerHeapHistory_V3_1,
CompactMechanisms,
ExpandMechanisms,
HeapIndex,
(const size_t) ExtraGen0Commit,
Count,
Arg0_Struct_Len_,
(const int*) Arg0_Struct_Pointer_
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledGCGlobalHeapHistory_V2(){ return TRUE;}
extern "C" ULONG FireEtXplatGCGlobalHeapHistory_V2(
const unsigned __int64 FinalYoungestDesired,
const signed int NumHeaps,
const unsigned int CondemnedGeneration,
const unsigned int Gen0ReductionCount,
const unsigned int Reason,
const unsigned int GlobalMechanisms,
const unsigned short ClrInstanceID,
const unsigned int PauseMode,
const unsigned int MemoryPressure
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledGCGlobalHeapHistory_V2()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
GCGlobalHeapHistory_V2,
FinalYoungestDesired,
NumHeaps,
CondemnedGeneration,
Gen0ReductionCount,
Reason,
GlobalMechanisms,
ClrInstanceID,
PauseMode,
MemoryPressure
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledDebugIPCEventStart(){ return TRUE;}
extern "C" ULONG FireEtXplatDebugIPCEventStart(
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledDebugIPCEventStart()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
DebugIPCEventStart
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledDebugIPCEventEnd(){ return TRUE;}
extern "C" ULONG FireEtXplatDebugIPCEventEnd(
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledDebugIPCEventEnd()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
DebugIPCEventEnd
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledDebugExceptionProcessingStart(){ return TRUE;}
extern "C" ULONG FireEtXplatDebugExceptionProcessingStart(
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledDebugExceptionProcessingStart()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
DebugExceptionProcessingStart
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledDebugExceptionProcessingEnd(){ return TRUE;}
extern "C" ULONG FireEtXplatDebugExceptionProcessingEnd(
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledDebugExceptionProcessingEnd()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
DebugExceptionProcessingEnd
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledCodeSymbols(){ return TRUE;}
extern "C" ULONG FireEtXplatCodeSymbols(
const unsigned __int64 ModuleId,
const unsigned short TotalChunks,
const unsigned short ChunkNumber,
const unsigned int ChunkLength,
const BYTE* Chunk,
const unsigned short ClrInstanceID
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledCodeSymbols()){ return ERROR_SUCCESS;}
tracepoint(
DotNETRuntime,
CodeSymbols,
ModuleId,
TotalChunks,
ChunkNumber,
ChunkLength,
(const BYTE*) Chunk,
ClrInstanceID
);
Error = ERROR_SUCCESS;
return Error;
}
extern "C" BOOL EventXplatEnabledEventSource(){ return TRUE;}
extern "C" ULONG FireEtXplatEventSource(
const signed int EventID,
PCWSTR EventName,
PCWSTR EventSourceName,
PCWSTR Payload
)
{
ULONG Error = ERROR_WRITE_FAULT;
if (!EventXplatEnabledEventSource()){ return ERROR_SUCCESS;}
INT EventName_path_size = -1;
PathCharString EventName_PS;
INT EventName_full_name_path_size = (PAL_wcslen(EventName) + 1)*sizeof(WCHAR);
CHAR* EventName_full_name = EventName_PS.OpenStringBuffer(EventName_full_name_path_size );
if (EventName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT EventSourceName_path_size = -1;
PathCharString EventSourceName_PS;
INT EventSourceName_full_name_path_size = (PAL_wcslen(EventSourceName) + 1)*sizeof(WCHAR);
CHAR* EventSourceName_full_name = EventSourceName_PS.OpenStringBuffer(EventSourceName_full_name_path_size );
if (EventSourceName_full_name == NULL ) { return ERROR_WRITE_FAULT; }
INT Payload_path_size = -1;
PathCharString Payload_PS;
INT Payload_full_name_path_size = (PAL_wcslen(Payload) + 1)*sizeof(WCHAR);
CHAR* Payload_full_name = Payload_PS.OpenStringBuffer(Payload_full_name_path_size );
if (Payload_full_name == NULL ) { return ERROR_WRITE_FAULT; }
EventName_path_size = WideCharToMultiByte( CP_ACP, 0, EventName, -1, EventName_full_name, EventName_full_name_path_size, NULL, NULL );
_ASSERTE(EventName_path_size < EventName_full_name_path_size );
EventName_PS.CloseBuffer(EventName_path_size );
if( EventName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
EventSourceName_path_size = WideCharToMultiByte( CP_ACP, 0, EventSourceName, -1, EventSourceName_full_name, EventSourceName_full_name_path_size, NULL, NULL );
_ASSERTE(EventSourceName_path_size < EventSourceName_full_name_path_size );
EventSourceName_PS.CloseBuffer(EventSourceName_path_size );
if( EventSourceName_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
Payload_path_size = WideCharToMultiByte( CP_ACP, 0, Payload, -1, Payload_full_name, Payload_full_name_path_size, NULL, NULL );
_ASSERTE(Payload_path_size < Payload_full_name_path_size );
Payload_PS.CloseBuffer(Payload_path_size );
if( Payload_path_size == 0 ){ return ERROR_INVALID_PARAMETER; }
tracepoint(
DotNETRuntime,
EventSource,
EventID,
EventName_full_name,
EventSourceName_full_name,
Payload_full_name
);
Error = ERROR_SUCCESS;
return Error;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment