1 // Copyright (C) 2019 The Android Open Source Project 2 // Copyright (C) 2019 Google Inc. 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 #include "aemu/base/Tracing.h" 16 17 #if defined(__ANDROID__) 18 19 #include <cutils/trace.h> 20 #define TRACE_TAG ATRACE_TAG_GRAPHICS 21 22 #elif defined(__Fuchsia__) && !defined(FUCHSIA_NO_TRACE) 23 24 #include <lib/trace/event.h> 25 #define TRACE_TAG "gfx" 26 27 #else 28 #endif 29 30 namespace gfxstream { 31 namespace guest { 32 isTracingEnabled()33bool isTracingEnabled() { 34 // TODO: Fuchsia + Linux 35 return false; 36 } 37 beginTraceImpl(const char * name)38void ScopedTraceGuest::beginTraceImpl(const char* name) { 39 // No-op 40 (void)name; 41 } 42 endTraceImpl(const char * name)43void ScopedTraceGuest::endTraceImpl(const char* name) { 44 // No-op 45 (void)name; 46 } 47 48 } // namespace base 49 } // namespace android 50