blob: 55d45b775ffaa23e458d34e444d9a123787fe586 [file] [log] [blame]
Zimcabd9662022-08-17 12:17:29 +01001/*
2 * Copyright (C) 2022 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#define ATRACE_TAG ATRACE_TAG_RRO
18
19#include "idmap2/SysTrace.h"
20
21#ifdef __ANDROID__
22namespace android::idmap2::utils {
23
24ScopedTraceNoStart::~ScopedTraceNoStart() {
25 ATRACE_END();
26};
27
28ScopedTraceMessageHelper::~ScopedTraceMessageHelper() {
29 ATRACE_BEGIN(buffer_.str().c_str());
30}
31
32bool atrace_enabled() {
33 return ATRACE_ENABLED();
34}
35} // namespace android::idmap2::utils
36#endif