Changeset View
Changeset View
Standalone View
Standalone View
perf.cpp
- 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 | #include "perf.h" | ||||
21 | | ||||
22 | #include <config-kwin.h> | ||||
23 | | ||||
24 | #ifdef KWIN_BUILD_PERF | ||||
25 | #include "helpers/perf/ftrace_marker.h" | ||||
26 | #endif | ||||
27 | | ||||
28 | namespace KWin | ||||
29 | { | ||||
30 | namespace Perf | ||||
31 | { | ||||
32 | | ||||
33 | #ifdef KWIN_BUILD_PERF | ||||
34 | void PerfInterface::ftrace(const QString &message) | ||||
35 | { | ||||
36 | FtraceMarker::self()->print(message); | ||||
37 | } | ||||
38 | void PerfInterface::ftrace(ulong ctx, const QString &message) | ||||
39 | { | ||||
40 | FtraceMarker::self()->print(ctx, message); | ||||
41 | } | ||||
42 | void PerfInterface::ftrace(const QString &message, ulong ctx) | ||||
43 | { | ||||
44 | FtraceMarker::self()->print(message, ctx); | ||||
45 | } | ||||
46 | | ||||
47 | #else | ||||
48 | | ||||
49 | void PerfInterface::ftrace(const QString &message) | ||||
50 | { | ||||
51 | Q_UNUSED(message) | ||||
52 | } | ||||
53 | void PerfInterface::ftrace(ulong ctx, const QString &message) | ||||
54 | { | ||||
55 | Q_UNUSED(message) | ||||
56 | Q_UNUSED(ctx) | ||||
57 | } | ||||
58 | void PerfInterface::ftrace(const QString &message, ulong ctx) | ||||
59 | { | ||||
60 | Q_UNUSED(message) | ||||
61 | Q_UNUSED(ctx) | ||||
62 | } | ||||
63 | #endif | ||||
64 | | ||||
65 | } | ||||
66 | } |