diff options
author | Miao Wang <miaowang@google.com> | 2017-10-04 19:45:45 -0700 |
---|---|---|
committer | Miao Wang <miaowang@google.com> | 2017-10-06 05:21:06 +0000 |
commit | 820215d28bed6c90f696cde0f282445d16da432e (patch) | |
tree | e55383c83d9cef059320a7fbb83d97d6fbfdc934 /nn/runtime/Manager.cpp | |
parent | 61e4a9e1fcec00f719c372a9d3614d1b1810608b (diff) | |
download | ml-820215d28bed6c90f696cde0f282445d16da432e.tar.gz |
Allow fine grain verbose logging control through system property.
- Existing DEBUG and INFO change to the new mechanism, existing ERROR and
WARNING unchanged.
- By default, all verbose logging are disabled.
- setprop debug.nn.vlog 1 enables all verbose logging.
- setprop debug.nn.vlog "tag1 tag2 ..." only enable the selected tags.
- Available tags:
all: same as 1.
model: enable logging with tag MODEL.
compilation: enable logging with tag COMPILATION.
execution: enable logging with tag EXECUTION.
cpuexe: enable logging with tag CPUEXE.
manager: enable logging with tag MANAGER.
driver: enable logging with tag DRIVER.
Bug: 63905942
Test: mm
Test: NeuralNetworksTests pass
Test: manually set property to allow individual module to logging
verbosely
Test: tested with debug.nn.partition default -> 0 -> 1 to make
sure getProp still works fine
Change-Id: Iaa0ffa62176dabcdc35058748597df720fd6e47e
Diffstat (limited to 'nn/runtime/Manager.cpp')
-rw-r--r-- | nn/runtime/Manager.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/nn/runtime/Manager.cpp b/nn/runtime/Manager.cpp index 42e0eed0e..25ccb21d9 100644 --- a/nn/runtime/Manager.cpp +++ b/nn/runtime/Manager.cpp @@ -44,8 +44,8 @@ void Device::initialize() { if (status != ErrorStatus::NONE) { LOG(ERROR) << "IDevice::getCapabilities returned the error " << toString(status); } - LOG(DEBUG) << "Capab " << capabilities.float32Performance.execTime; - LOG(DEBUG) << "Capab " << capabilities.quantized8Performance.execTime; + VLOG(MANAGER) << "Capab " << capabilities.float32Performance.execTime; + VLOG(MANAGER) << "Capab " << capabilities.quantized8Performance.execTime; mFloat32Performance = capabilities.float32Performance; mQuantized8Performance = capabilities.quantized8Performance; }); @@ -118,7 +118,7 @@ DeviceManager* DeviceManager::get() { void DeviceManager::findAvailableDevices() { using ::android::hardware::neuralnetworks::V1_0::IDevice; using ::android::hidl::manager::V1_0::IServiceManager; - LOG(DEBUG) << "findAvailableDevices"; + VLOG(MANAGER) << "findAvailableDevices"; sp<IServiceManager> manager = hardware::defaultServiceManager(); if (manager == nullptr) { @@ -128,7 +128,7 @@ void DeviceManager::findAvailableDevices() { manager->listByInterface(IDevice::descriptor, [this](const hidl_vec<hidl_string>& names) { for (const auto& name : names) { - LOG(DEBUG) << "Found interface " << name.c_str(); + VLOG(MANAGER) << "Found interface " << name.c_str(); sp<IDevice> device = IDevice::getService(name); if (device == nullptr) { LOG(ERROR) << "Got a null IDEVICE for " << name.c_str(); @@ -140,7 +140,7 @@ void DeviceManager::findAvailableDevices() { } DeviceManager::DeviceManager() { - LOG(VERBOSE) << "DeviceManager::DeviceManager"; + VLOG(MANAGER) << "DeviceManager::DeviceManager"; findAvailableDevices(); #ifdef NN_DEBUGGABLE mPartitioning = getProp("debug.nn.partition", kPartitioningDefault); |