PerfHint.h 1003 B

123456789101112131415161718192021222324252627282930313233
  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. enum class PerfHintLevels
  7. {
  8. L1 = 1, // Critical
  9. L2, // Noisy but should give you all
  10. VERBOSE = L2,
  11. };
  12. enum PerfHints : uint
  13. {
  14. #define PERFHINT_REASON(name, isNotOptimized, level, desc, consequences, suggestion) name,
  15. #include "PerfHintDescriptions.h"
  16. #undef PERFHINT_REASON
  17. };
  18. struct PerfHintItem
  19. {
  20. LPCWSTR description;
  21. LPCWSTR consequences;
  22. LPCWSTR suggestion;
  23. PerfHintLevels level;
  24. bool isNotOptimized;
  25. };
  26. extern const PerfHintItem s_perfHintContainer[];
  27. void WritePerfHint(PerfHints hint, Js::FunctionBody * functionBody, uint byteCodeOffset = Js::Constants::NoByteCodeOffset);