1 /* 2 __ 3 / _| 4 __ _ _ _ _ __ ___ _ __ __ _ | |_ ___ ___ ___ 5 / _` | | | | '__/ _ \| '__/ _` | | _/ _ \/ __/ __| 6 | (_| | |_| | | | (_) | | | (_| | | || (_) \__ \__ \ 7 \__,_|\__,_|_| \___/|_| \__,_| |_| \___/|___/___/ 8 9 Copyright (C) 2015 The Android Open Source Project. 10 Copyright (C) 2018-2019 Aurora Free Open Source Software. 11 12 This file is part of the Aurora Free Open Source Software. This 13 organization promote free and open source software that you can 14 redistribute and/or modify under the terms of the GNU Lesser General 15 Public License Version 3 as published by the Free Software Foundation or 16 (at your option) any later version approved by the Aurora Free Open Source 17 Software Organization. The license is available in the package root path 18 as 'LICENSE' file. Please review the following information to ensure the 19 GNU Lesser General Public License version 3 requirements will be met: 20 https://www.gnu.org/licenses/lgpl.html . 21 22 Alternatively, this file may be used under the terms of the GNU General 23 Public License version 3 or later as published by the Free Software 24 Foundation. Please review the following information to ensure the GNU 25 General Public License requirements will be met: 26 https://www.gnu.org/licenses/gpl-3.0.html. 27 28 NOTE: All products, services or anything associated to trademarks and 29 service marks used or referenced on this file are the property of their 30 respective companies/owners or its subsidiaries. Other names and brands 31 may be claimed as the property of others. 32 33 For more info about intellectual property visit: aurorafoss.org or 34 directly send an email to: contact (at) aurorafoss.org . 35 36 This file has bindings for an existing code, part of The Android Open Source 37 Project implementation. Check it out at android.googlesource.com . 38 */ 39 40 module aurorafw.android.platform.trace; 41 42 /** 43 * @addtogroup Tracing 44 * @{ 45 */ 46 47 /** 48 * @file aurorafw/android/platform/trace.d 49 * @brief Writes trace events to the system trace buffer. 50 * 51 * These trace events can be collected and visualized using the Systrace tool. 52 * For information about using the Systrace tool, read <a href="https://developer.android.com/studio/profile/systrace.html">Analyzing UI Performance with Systrace</a>. 53 * 54 * Available since API level 23. 55 */ 56 57 version (Android): 58 extern (C): 59 @system: 60 nothrow: 61 @nogc: 62 63 /** 64 * Returns true if tracing is enabled. Use this to avoid expensive computation only necessary 65 * when tracing is enabled. 66 * 67 * Available since API level 23. 68 */ 69 bool ATrace_isEnabled (); 70 71 /** 72 * Writes a tracing message to indicate that the given section of code has begun. This call must be 73 * followed by a corresponding call to {@link ATrace_endSection} on the same thread. 74 * 75 * Note: At this time the vertical bar character '|' and newline character '\\n' are used internally 76 * by the tracing mechanism. If \p sectionName contains these characters they will be replaced with a 77 * space character in the trace. 78 * 79 * Available since API level 23. 80 */ 81 void ATrace_beginSection (const(char)* sectionName); 82 83 /** 84 * Writes a tracing message to indicate that a given section of code has ended. This call must be 85 * preceeded by a corresponding call to {@link ATrace_beginSection} on the same thread. Calling this method 86 * will mark the end of the most recently begun section of code, so care must be taken to ensure 87 * that {@link ATrace_beginSection}/{@link ATrace_endSection} pairs are properly nested and called from the same thread. 88 * 89 * Available since API level 23. 90 */ 91 void ATrace_endSection (); 92 93 /* __ANDROID_API__ >= 23 */ 94 95 // ANDROID_NATIVE_TRACE_H 96 97 /** @} */