Changeset View
Changeset View
Standalone View
Standalone View
perf.h
- This file was added.
1 | /******************************************************************** | ||||
---|---|---|---|---|---|
2 | KWin - the KDE window manager | ||||
3 | This file is part of the KDE project. | ||||
4 | | ||||
5 | Copyright 2019 Roman Gilg <subdiff@gmail.com> | ||||
6 | | ||||
7 | This program is free software; you can redistribute it and/or modify | ||||
8 | it under the terms of the GNU General Public License as published by | ||||
9 | the Free Software Foundation; either version 2 of the License, or | ||||
10 | (at your option) any later version. | ||||
11 | | ||||
12 | This program is distributed in the hope that it will be useful, | ||||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
15 | GNU General Public License for more details. | ||||
16 | | ||||
17 | You should have received a copy of the GNU General Public License | ||||
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
19 | *********************************************************************/ | ||||
20 | #pragma once | ||||
21 | | ||||
22 | #include <kwin_export.h> | ||||
23 | | ||||
24 | #include <QString> | ||||
25 | #include <QDebug> | ||||
26 | | ||||
27 | namespace KWin | ||||
28 | { | ||||
29 | namespace Perf | ||||
30 | { | ||||
31 | | ||||
32 | /** | ||||
33 | * Internal perf API for consumers | ||||
34 | */ | ||||
35 | class KWIN_EXPORT PerfInterface | ||||
36 | { | ||||
37 | | ||||
38 | public: | ||||
39 | static void ftrace(const QString &message); | ||||
40 | static void ftrace(ulong ctx, const QString &message); | ||||
41 | static void ftrace(const QString &message, ulong ctx); | ||||
42 | }; | ||||
43 | | ||||
44 | inline | ||||
45 | void ftrace(const QString &message) | ||||
46 | { | ||||
47 | PerfInterface::ftrace(message); | ||||
48 | } | ||||
49 | | ||||
50 | inline | ||||
51 | void ftrace(ulong ctx, const QString &message) | ||||
52 | { | ||||
53 | PerfInterface::ftrace(ctx, message); | ||||
54 | } | ||||
55 | | ||||
56 | inline | ||||
57 | void ftrace(const QString &message, ulong ctx) | ||||
58 | { | ||||
59 | PerfInterface::ftrace(message, ctx); | ||||
60 | } | ||||
61 | | ||||
62 | } | ||||
63 | } |