FunctionJITTimeInfo.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. #pragma once
  6. class FunctionJITTimeInfo
  7. {
  8. public:
  9. FunctionJITTimeInfo(FunctionJITTimeDataIDL * data);
  10. static void BuildJITTimeData(
  11. __in ArenaAllocator * alloc,
  12. __in const Js::FunctionCodeGenJitTimeData * codeGenData,
  13. __in_opt const Js::FunctionCodeGenRuntimeData * runtimeData,
  14. __out FunctionJITTimeDataIDL * jitData,
  15. bool isInlinee,
  16. bool isForegroundJIT);
  17. uint GetInlineeCount() const;
  18. bool IsLdFldInlineePresent() const;
  19. const FunctionJITTimeInfo * GetLdFldInlinee(Js::InlineCacheIndex inlineCacheIndex) const;
  20. const FunctionJITTimeInfo * GetInlinee(Js::ProfileId profileId) const;
  21. const FunctionJITTimeInfo * GetNext() const;
  22. JITTimeFunctionBody * GetBody() const;
  23. bool IsPolymorphicCallSite(Js::ProfileId profiledCallSiteId) const;
  24. intptr_t GetFunctionInfoAddr() const;
  25. intptr_t GetWeakFuncRef() const;
  26. uint GetLocalFunctionId() const;
  27. uint GetSourceContextId() const;
  28. bool HasBody() const;
  29. bool IsAggressiveInliningEnabled() const;
  30. bool IsInlined() const;
  31. const FunctionJITRuntimeInfo * GetRuntimeInfo() const;
  32. const BVFixed * GetInlineesBV() const;
  33. const FunctionJITTimeInfo * GetJitTimeDataFromFunctionInfoAddr(intptr_t polyFuncInfo) const;
  34. JITObjTypeSpecFldInfo * GetObjTypeSpecFldInfo(uint index) const;
  35. JITObjTypeSpecFldInfo * GetGlobalObjTypeSpecFldInfo(uint index) const;
  36. uint GetGlobalObjTypeSpecFldInfoCount() const;
  37. const FunctionJITRuntimeInfo * GetInlineeForTargetInlineeRuntimeData(const Js::ProfileId profiledCallSiteId, intptr_t inlineeFuncBodyAddr) const;
  38. const FunctionJITRuntimeInfo *GetInlineeRuntimeData(const Js::ProfileId profiledCallSiteId) const;
  39. const FunctionJITRuntimeInfo *GetLdFldInlineeRuntimeData(const Js::InlineCacheIndex inlineCacheIndex) const;
  40. bool ForceJITLoopBody() const;
  41. bool HasSharedPropertyGuards() const;
  42. bool HasSharedPropertyGuard(Js::PropertyId id) const;
  43. char16* GetDisplayName() const;
  44. char16* GetDebugNumberSet(wchar(&bufferToWriteTo)[MAX_FUNCTION_BODY_DEBUG_STRING_SIZE]) const;
  45. private:
  46. FunctionJITTimeDataIDL m_data;
  47. };