Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mesa
Path: blob/21.2-virgl/src/tool/pps/pps_producer.cc
7354 views
1
/*
2
* Copyright © 2019-2020 Collabora, Ltd.
3
* Author: Antonio Caggiano <[email protected]>
4
* Author: Robert Beckett <[email protected]>
5
* Author: Corentin Noël <[email protected]>
6
*
7
* SPDX-License-Identifier: MIT
8
*/
9
10
#include <cstdlib>
11
12
#include "pps_datasource.h"
13
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
35