• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright © 2019-2020 Collabora, Ltd.
3  * Author: Antonio Caggiano <antonio.caggiano@collabora.com>
4  * Author: Robert Beckett <bob.beckett@collabora.com>
5  * Author: Corentin Noël <corentin.noel@collabora.com>
6  *
7  * SPDX-License-Identifier: MIT
8  */
9 
10 #include <cstdlib>
11 
12 #include "pps_datasource.h"
13 
main(int argc,const char ** argv)14 int main(int argc, const char **argv)
15 {
16    using namespace pps;
17 
18    // Connects to the system tracing service
19    perfetto::TracingInitArgs args;
20    args.backends = perfetto::kSystemBackend;
21    perfetto::Tracing::Initialize(args);
22 
23    std::string driver_name =
24       (argc > 1) ? Driver::find_driver_name(argv[1]) : Driver::default_driver_name();
25    GpuDataSource::register_data_source(driver_name);
26 
27    while (true) {
28       GpuDataSource::wait_started();
29       GpuDataSource::Trace(GpuDataSource::trace_callback);
30    }
31 
32    return EXIT_SUCCESS;
33 }
34