FunctionJITTimeInfo.h 2.9 KB

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