1/* 2 * Copyright (C) 2018 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 17package android.hardware.atrace@1.0; 18 19interface IAtraceDevice { 20 /** 21 * Get vendor extended atrace points. 22 * 23 * 24 * @return categories of tracing points the device extended. 25 */ 26 listCategories() generates (vec<TracingCategory> categories); 27 28 /** 29 * A hook when atrace set to enable specific categories, so HAL 30 * can enable kernel tracing points and/or notify other things 31 * for userspace tracing turning on. 32 * 33 * @param categories A vector of strings of categories (corresponding to 34 * TracingCategory.name) atrace needs to be enabled. 35 * 36 * @return status SUCCESS on success, 37 * ERROR_TRACING_POINT on error with enabling categories, 38 * ERROR_INVALID_ARGUMENT on invalid argument passed. 39 */ 40 enableCategories(vec<string> categories) generates (Status status); 41 42 /** 43 * A hook when atrace set to clean up tracing categories, so HAL 44 * can disable all kernel tracing points and/or notify other things 45 * for userspace tracing turning off. 46 * 47 * @return status SUCCESS on success, 48 * ERROR_TRACING_POINT on error with disabling categories. 49 */ 50 disableAllCategories() generates (Status status); 51}; 52