# ## 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. # # #USAGE: #Add Events: modify src/vm/ClrEtwAll.man #Look at the Code in /src/scripts/genLttngProvider.py for using subroutines in this file # # Python 2 compatibility from __future__ import print_function import os import xml.dom.minidom as DOM from utilities import open_for_update stdprolog=""" // 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 /src/scripts/genEventing.py ******************************************************************/ """ stdprolog_cmake=""" # # #****************************************************************** #DO NOT MODIFY. AUTOGENERATED FILE. #This file is generated using the logic from /src/scripts/genEventing.py #****************************************************************** """ lindent = " "; palDataTypeMapping ={ #constructed types "win:null" :" ", "win:Int64" :"const __int64", "win:ULong" :"const ULONG", "win:count" :"*", "win:Struct" :"const void", #actual spec "win:GUID" :"const GUID", "win:AnsiString" :"LPCSTR", "win:UnicodeString" :"PCWSTR", "win:Double" :"const double", "win:Int32" :"const signed int", "win:Boolean" :"const BOOL", "win:UInt64" :"const unsigned __int64", "win:UInt32" :"const unsigned int", "win:UInt16" :"const unsigned short", "win:UInt8" :"const unsigned char", "win:Pointer" :"const void*", "win:Binary" :"const BYTE" } # A Template represents an ETW template can contain 1 or more AbstractTemplates # The AbstractTemplate contains FunctionSignature # FunctionSignature consist of FunctionParameter representing each parameter in it's signature def getParamSequenceSize(paramSequence, estimate): total = 0 pointers = 0 for param in paramSequence: if param == "win:Int64": total += 8 elif param == "win:ULong": total += 4 elif param == "GUID": total += 16 elif param == "win:Double": total += 8 elif param == "win:Int32": total += 4 elif param == "win:Boolean": total += 4 elif param == "win:UInt64": total += 8 elif param == "win:UInt32": total += 4 elif param == "win:UInt16": total += 2 elif param == "win:UInt8": total += 1 elif param == "win:Pointer": if estimate: total += 8 else: pointers += 1 elif param == "win:Binary": total += 1 elif estimate: if param == "win:AnsiString": total += 32 elif param == "win:UnicodeString": total += 64 elif param == "win:Struct": total += 32 else: raise Exception("Don't know size for " + param) if estimate: return total return total, pointers class Template: def __repr__(self): return "