VTS driver files for memtrack HAL.

Test: manual
Change-Id: If2e7c5a60248b345b499c7d32ae68b23be7f0923
This commit is contained in:
Ryan Campbell
2016-11-07 09:42:19 -08:00
parent 3b3b9251fa
commit eb8a796edd
3 changed files with 241 additions and 0 deletions

View File

@@ -0,0 +1,87 @@
#
# Copyright (C) 2016 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
LOCAL_PATH := $(call my-dir)
# build VTS driver for memtrack v1.0.
include $(CLEAR_VARS)
LOCAL_MODULE := libvts_driver_hidl_memtrack@1.0
LOCAL_SRC_FILES := \
Memtrack.vts \
types.vts \
LOCAL_C_INCLUDES := \
android.hardware.memtrack@1.0 \
system/core/base/include \
system/core/include \
LOCAL_SHARED_LIBRARIES += \
android.hardware.memtrack@1.0 \
libbase \
libutils \
libcutils \
liblog \
libhidl \
libhwbinder \
libprotobuf-cpp-full \
libvts_common \
libvts_datatype \
libvts_measurement \
libvts_multidevice_proto \
LOCAL_CFLAGS += -DENABLE_TREBLE
LOCAL_STATIC_LIBRARIES := \
LOCAL_PROTOC_OPTIMIZE_TYPE := full
LOCAL_MULTILIB := both
include $(BUILD_SHARED_LIBRARY)
# build profiler for memtrack.
include $(CLEAR_VARS)
LOCAL_MODULE := libvts_profiler_hidl_memtrack@1.0
LOCAL_SRC_FILES := \
Memtrack.vts \
types.vts \
LOCAL_C_INCLUDES += \
test/vts/drivers/libprofiling \
LOCAL_VTS_MODE := PROFILER
LOCAL_SHARED_LIBRARIES := \
android.hardware.memtrack@1.0 \
libbase \
libcutils \
liblog \
libhidl \
libhwbinder \
libprotobuf-cpp-full \
libvts_common \
libvts_multidevice_proto \
libvts_profiling \
libutils \
LOCAL_PROTOC_OPTIMIZE_TYPE := full
include $(BUILD_SHARED_LIBRARY)

View File

@@ -0,0 +1,33 @@
component_class: HAL_HIDL
component_type_version: 1.0
component_name: "IMemtrack"
package: "android.hardware.memtrack"
import: "android.hardware.memtrack@1.0::types"
interface: {
api: {
name: "getMemory"
return_type_hidl: {
type: TYPE_ENUM
predefined_type: "::android::hardware::memtrack::V1_0::MemtrackStatus"
}
return_type_hidl: {
type: TYPE_VECTOR
vector_value: {
type: TYPE_STRUCT
predefined_type: "::android::hardware::memtrack::V1_0::MemtrackRecord"
}
}
arg: {
type: TYPE_SCALAR
scalar_type: "int32_t"
}
arg: {
type: TYPE_ENUM
predefined_type: "::android::hardware::memtrack::V1_0::MemtrackType"
}
}
}

121
memtrack/1.0/vts/types.vts Normal file
View File

@@ -0,0 +1,121 @@
component_class: HAL_HIDL
component_type_version: 1.0
component_name: "types"
package: "android.hardware.memtrack"
attribute: {
name: "::android::hardware::memtrack::V1_0::MemtrackFlag"
type: TYPE_ENUM
enum_value: {
scalar_type: "uint32_t"
enumerator: "SMAPS_ACCOUNTED"
scalar_value: {
uint32_t: 2
}
enumerator: "SMAPS_UNACCOUNTED"
scalar_value: {
uint32_t: 4
}
enumerator: "SHARED"
scalar_value: {
uint32_t: 8
}
enumerator: "SHARED_PSS"
scalar_value: {
uint32_t: 16
}
enumerator: "PRIVATE"
scalar_value: {
uint32_t: 32
}
enumerator: "SYSTEM"
scalar_value: {
uint32_t: 64
}
enumerator: "DEDICATED"
scalar_value: {
uint32_t: 128
}
enumerator: "NONSECURE"
scalar_value: {
uint32_t: 256
}
enumerator: "SECURE"
scalar_value: {
uint32_t: 512
}
}
}
attribute: {
name: "::android::hardware::memtrack::V1_0::MemtrackType"
type: TYPE_ENUM
enum_value: {
scalar_type: "uint32_t"
enumerator: "OTHER"
scalar_value: {
uint32_t: 0
}
enumerator: "GL"
scalar_value: {
uint32_t: 1
}
enumerator: "GRAPHICS"
scalar_value: {
uint32_t: 2
}
enumerator: "MULTIMEDIA"
scalar_value: {
uint32_t: 3
}
enumerator: "CAMERA"
scalar_value: {
uint32_t: 4
}
enumerator: "NUM_TYPES"
scalar_value: {
uint32_t: 5
}
}
}
attribute: {
name: "::android::hardware::memtrack::V1_0::MemtrackStatus"
type: TYPE_ENUM
enum_value: {
scalar_type: "uint32_t"
enumerator: "SUCCESS"
scalar_value: {
uint32_t: 0
}
enumerator: "MEMORY_TRACKING_NOT_SUPPORTED"
scalar_value: {
uint32_t: 1
}
enumerator: "TYPE_NOT_SUPPORTED"
scalar_value: {
uint32_t: 2
}
}
}
attribute: {
name: "::android::hardware::memtrack::V1_0::MemtrackRecord"
type: TYPE_STRUCT
struct_value: {
name: "sizeInBytes"
type: TYPE_SCALAR
scalar_type: "uint64_t"
}
struct_value: {
name: "flags"
type: TYPE_SCALAR
scalar_type: "uint32_t"
}
}