thread_type.h 1.1 KB

123456789101112131415161718192021222324252627282930
  1. // Copyright 2018 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_SCHEDULING_METRICS_THREAD_TYPE_H_
  5. #define COMPONENTS_SCHEDULING_METRICS_THREAD_TYPE_H_
  6. namespace scheduling_metrics {
  7. // The list of all threads in the Chrome we support scheduling metrics for.
  8. // This enum is used as a key in histograms and should not be renumbered.
  9. // Please update SchedulerThreadType enum in tools/metrics/histograms/enums.xml
  10. // when adding new values.
  11. enum class ThreadType {
  12. kBrowserUIThread = 0,
  13. kBrowserIOThread = 1,
  14. kRendererMainThread = 2,
  15. kRendererCompositorThread = 3,
  16. kRendererDedicatedWorkerThread = 4,
  17. kRendererServiceWorkerThread = 5,
  18. // Blink has ~10 other named threads, however they run just a few tasks.
  19. // Aggregate them into a single item for clarity and split out if necessary.
  20. kRendererOtherBlinkThread = 6,
  21. kMaxValue = kRendererOtherBlinkThread,
  22. };
  23. } // namespace scheduling_metrics
  24. #endif // COMPONENTS_SCHEDULING_METRICS_THREAD_TYPE_H_