Cross Reference: pps_producer.cc
xref: /xsrc/external/mit/MesaLib/dist/src/tool/pps/pps_producer.cc
  • Home
  • History
  • AnnotateAnnotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /xsrc/external/mit/MesaLib/dist/src/tool/pps/
17ec681f3Smrg/*
27ec681f3Smrg * Copyright © 2019-2020 Collabora, Ltd.
37ec681f3Smrg * Author: Antonio Caggiano <antonio.caggiano@collabora.com>
47ec681f3Smrg * Author: Robert Beckett <bob.beckett@collabora.com>
57ec681f3Smrg * Author: Corentin Noël <corentin.noel@collabora.com>
67ec681f3Smrg *
77ec681f3Smrg * SPDX-License-Identifier: MIT
87ec681f3Smrg */
97ec681f3Smrg
107ec681f3Smrg#include <cstdlib>
117ec681f3Smrg
127ec681f3Smrg#include "pps_datasource.h"
137ec681f3Smrg
147ec681f3Smrgint main(int argc, const char **argv)
157ec681f3Smrg{
167ec681f3Smrg   using namespace pps;
177ec681f3Smrg
187ec681f3Smrg   // Connects to the system tracing service
197ec681f3Smrg   perfetto::TracingInitArgs args;
207ec681f3Smrg   args.backends = perfetto::kSystemBackend;
217ec681f3Smrg   perfetto::Tracing::Initialize(args);
227ec681f3Smrg
237ec681f3Smrg   std::string driver_name =
247ec681f3Smrg      (argc > 1) ? Driver::find_driver_name(argv[1]) : Driver::default_driver_name();
257ec681f3Smrg   GpuDataSource::register_data_source(driver_name);
267ec681f3Smrg
277ec681f3Smrg   while (true) {
287ec681f3Smrg      GpuDataSource::wait_started();
297ec681f3Smrg      GpuDataSource::Trace(GpuDataSource::trace_callback);
307ec681f3Smrg   }
317ec681f3Smrg
327ec681f3Smrg   return EXIT_SUCCESS;
337ec681f3Smrg}
34

Indexes created Sun Nov 30 08:09:32 GMT 2025