FunctionJITTimeInfo.h 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 * GetCallbackInlinee(Js::ProfileId profileId) const;
  20. const FunctionJITTimeInfo * GetCallApplyTargetInlinee(Js::ProfileId profileId) const;
  21. const Js::ProfileId GetCallApplyCallSiteIdForCallSiteId(Js::ProfileId profiledCallSiteId) const;
  22. const FunctionJITTimeInfo * GetLdFldInlinee(Js::InlineCacheIndex inlineCacheIndex) const;
  23. const FunctionJITTimeInfo * GetInlinee(Js::ProfileId profileId) const;
  24. const FunctionJITTimeInfo * GetNext() const;
  25. JITTimeFunctionBody * GetBody() const;
  26. bool IsPolymorphicCallSite(Js::ProfileId profiledCallSiteId) const;
  27. intptr_t GetFunctionInfoAddr() const;
  28. intptr_t GetEntryPointInfoAddr() const;
  29. intptr_t GetWeakFuncRef() const;
  30. uint GetLocalFunctionId() const;
  31. uint GetSourceContextId() const;
  32. bool HasBody() const;
  33. bool IsAggressiveInliningEnabled() const;
  34. bool IsInlined() const;
  35. const FunctionJITRuntimeInfo * GetRuntimeInfo() const;
  36. const BVFixed * GetInlineesBV() const;
  37. const FunctionJITTimeInfo * GetJitTimeDataFromFunctionInfoAddr(intptr_t polyFuncInfo) const;
  38. ObjTypeSpecFldInfo * GetObjTypeSpecFldInfo(uint index) const;
  39. void ClearObjTypeSpecFldInfo(uint index);
  40. ObjTypeSpecFldInfo * GetGlobalObjTypeSpecFldInfo(uint index) const;
  41. uint GetGlobalObjTypeSpecFldInfoCount() const;
  42. const FunctionJITRuntimeInfo * GetInlineeForTargetInlineeRuntimeData(const Js::ProfileId profiledCallSiteId, intptr_t inlineeFuncBodyAddr) const;
  43. const FunctionJITRuntimeInfo *GetInlineeRuntimeData(const Js::ProfileId profiledCallSiteId) const;
  44. const FunctionJITRuntimeInfo *GetLdFldInlineeRuntimeData(const Js::InlineCacheIndex inlineCacheIndex) const;
  45. const FunctionJITRuntimeInfo * GetCallbackInlineeRuntimeData(const Js::ProfileId profiledCallSiteId) const;
  46. const FunctionJITRuntimeInfo * GetInlineeForCallbackInlineeRuntimeData(const Js::ProfileId profiledCallSiteId, intptr_t inlineeFuncBodyAddr) const;
  47. const FunctionJITRuntimeInfo * GetCallApplyTargetInlineeRuntimeData(const Js::ProfileId callApplyCallSiteId) const;
  48. bool ForceJITLoopBody() const;
  49. bool HasSharedPropertyGuards() const;
  50. bool HasSharedPropertyGuard(Js::PropertyId id) const;
  51. bool IsJsBuiltInForceInline() const;
  52. char16* GetDisplayName() const;
  53. char16* GetDebugNumberSet(wchar(&bufferToWriteTo)[MAX_FUNCTION_BODY_DEBUG_STRING_SIZE]) const;
  54. private:
  55. FunctionJITTimeDataIDL m_data;
  56. };