summaryrefslogtreecommitdiff
path: root/runtimes/logging
diff options
context:
space:
mode:
author이성재/동작제어Lab(SR)/Principal Engineer/삼성전자 <sj925.lee@samsung.com>2018-05-09 11:25:24 +0900
committerGitHub Enterprise <noreply-CODE@samsung.com>2018-05-09 11:25:24 +0900
commit0b9c0e9da7dcc4e387453e543c125e781a046b1a (patch)
tree5a3f64757245c9345ccf92747f70d721c157ef06 /runtimes/logging
parent957dadeb4e18e35d016b3fbc248ebe11b1e4950f (diff)
downloadnnfw-0b9c0e9da7dcc4e387453e543c125e781a046b1a.tar.gz
nnfw-0b9c0e9da7dcc4e387453e543c125e781a046b1a.tar.bz2
nnfw-0b9c0e9da7dcc4e387453e543c125e781a046b1a.zip
Add object allocation info to log message (#1134)
* Add object allocation info to log message - display `--> (type: address)` information at the end of the log line for each allocation call. Signed-off-by: Sung-Jae Lee <sj925.lee@samsung.com>
Diffstat (limited to 'runtimes/logging')
-rw-r--r--runtimes/logging/src/nnapi_logging.cc23
1 files changed, 14 insertions, 9 deletions
diff --git a/runtimes/logging/src/nnapi_logging.cc b/runtimes/logging/src/nnapi_logging.cc
index 978412584..a46480fee 100644
--- a/runtimes/logging/src/nnapi_logging.cc
+++ b/runtimes/logging/src/nnapi_logging.cc
@@ -140,8 +140,10 @@ struct ANeuralNetworksMemory
ResultCode ANeuralNetworksMemory_createFromFd(size_t size, int protect, int fd, size_t offset,
ANeuralNetworksMemory **memory)
{
- std::cout << __FUNCTION__ << "()" << std::endl;
*memory = new ANeuralNetworksMemory;
+
+ std::cout << __FUNCTION__ << "() --> (memory: " << *memory << ")" << std::endl;
+
return ANEURALNETWORKS_NO_ERROR;
}
@@ -169,10 +171,10 @@ struct ANeuralNetworksModel
ResultCode ANeuralNetworksModel_create(ANeuralNetworksModel **model)
{
- std::cout << __FUNCTION__ << "(" << model << ")" << std::endl;
-
*model = new ANeuralNetworksModel;
+ std::cout << __FUNCTION__ << "(" << model << ") --> (model: " << *model << ")" << std::endl;
+
return ANEURALNETWORKS_NO_ERROR;
}
@@ -296,10 +298,11 @@ struct ANeuralNetworksCompilation
ResultCode ANeuralNetworksCompilation_create(ANeuralNetworksModel *model,
ANeuralNetworksCompilation **compilation)
{
- std::cout << __FUNCTION__ << "(model: " << model << ")" << std::endl;
-
*compilation = new ANeuralNetworksCompilation;
+ std::cout << __FUNCTION__ << "(model: " << model << ") --> (compilation: " << *compilation << ")"
+ << std::endl;
+
return ANEURALNETWORKS_NO_ERROR;
}
@@ -321,10 +324,11 @@ struct ANeuralNetworksExecution
ResultCode ANeuralNetworksExecution_create(ANeuralNetworksCompilation *compilation,
ANeuralNetworksExecution **execution)
{
- std::cout << __FUNCTION__ << "(compilation: " << compilation << ")" << std::endl;
-
*execution = new ANeuralNetworksExecution;
+ std::cout << __FUNCTION__ << "(compilation: " << compilation << ") --> (execution: " << *execution
+ << ")" << std::endl;
+
return ANEURALNETWORKS_NO_ERROR;
}
@@ -364,10 +368,11 @@ ResultCode ANeuralNetworksExecution_setOutput(ANeuralNetworksExecution *executio
ResultCode ANeuralNetworksExecution_startCompute(ANeuralNetworksExecution *execution,
ANeuralNetworksEvent **event)
{
- std::cout << __FUNCTION__ << "(execution: " << execution << ")" << std::endl;
-
*event = new ANeuralNetworksEvent;
+ std::cout << __FUNCTION__ << "(execution: " << execution << ") --> (event: " << *event << ")"
+ << std::endl;
+
return ANEURALNETWORKS_NO_ERROR;
}