heap_profiling_service.h 1.3 KB

1234567891011121314151617181920212223242526272829
  1. // Copyright 2019 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_SERVICES_HEAP_PROFILING_HEAP_PROFILING_SERVICE_H_
  5. #define COMPONENTS_SERVICES_HEAP_PROFILING_HEAP_PROFILING_SERVICE_H_
  6. #include "components/services/heap_profiling/public/mojom/heap_profiling_service.mojom.h"
  7. #include "mojo/public/cpp/bindings/pending_remote.h"
  8. #include "services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom.h"
  9. namespace heap_profiling {
  10. // Returns a PendingRemote which can be bound to control a new ProfilingService
  11. // instance running on a dedicated thread. The service will run until this
  12. // remote is disconnected.
  13. //
  14. // |profiler_receiver| must be valid and will receive heap profiling requests.
  15. // |helper| must be valid and will be used by the service to retrieve memory
  16. // maps.
  17. mojo::PendingRemote<mojom::ProfilingService> LaunchService(
  18. mojo::PendingReceiver<memory_instrumentation::mojom::HeapProfiler>
  19. profiler_receiver,
  20. mojo::PendingRemote<memory_instrumentation::mojom::HeapProfilerHelper>
  21. helper);
  22. } // namespace heap_profiling
  23. #endif // COMPONENTS_SERVICES_HEAP_PROFILING_HEAP_PROFILING_SERVICE_H_