-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bugfix] Modify dlog output code #191
Conversation
📝 TAOS-CI Version: 1.5.20200925. Thank you for submitting PR #191. Please a submit 1commit/1PR (one commit per one PR) policy to get comments quickly from reviewers. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://ci.nnstreamer.ai/. |
cibot: @songgot, A builder checker could not be completed because one of the checkers is not completed. In order to find out a reason, please go to http://ci.nnstreamer.ai/nnstreamer-edge/ci/repo-workers/pr-checker/191-202310181422380.47395205497742-d1ee31d0e679a1c478a49fdec65d8ddb30dca408/. |
60ef94d
to
41c4382
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@songgot, 💯 All CI checkers are successfully verified. Thanks.
@@ -14,6 +14,7 @@ | |||
#define __NNSTREAMER_EDGE_AITT_H__ | |||
|
|||
#include "nnstreamer-edge.h" | |||
#include "nnstreamer-edge-log.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any symbols defined in nnstreamer-edge-log.h in this header file.
If there are .c files using nnstreamer-edge-log.h symbols, add include in .c files, not in .h file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.
#include <aitt_c.h>
, line 26 in this file
The two values below must be redefined and used. This value is defined in <dlog.h> in nnstreamer-edge-log.h.
[ 41s] In file included from /usr/include/aitt/aitt_c.h:24,
[ 41s] from /home/abuild/rpmbuild/BUILD/nnstreamer-edge-0.2.5/src/libnnstreamer-edge/nnstreamer-edge-aitt.h:25,
[ 41s] from /home/abuild/rpmbuild/BUILD/nnstreamer-edge-0.2.5/src/libnnstreamer-edge/nnstreamer-edge-aitt.c:19:
[ 41s] /usr/include/aitt/AittTypes.h:71:26: error: expected identifier before numeric constant
[ 41s] 71 | #define TIZEN_ERROR_NONE 0
[ 41s] | ^
[ 41s] In file included from /home/abuild/rpmbuild/BUILD/nnstreamer-edge-0.2.5/src/libnnstreamer-edge/nnstreamer-edge-log.h:26,
[ 41s] from /home/abuild/rpmbuild/BUILD/nnstreamer-edge-0.2.5/src/libnnstreamer-edge/nnstreamer-edge-aitt.c:23:
[ 41s] /usr/include/dlog/dlog.h:72:29: error: 'TIZEN_ERROR_NOT_PERMITTED' undeclared here (not in a function); did you mean 'TIZEN_ERROR_NOT_SUPPORTED'?
[ 41s] 72 | DLOG_ERROR_NOT_PERMITTED = TIZEN_ERROR_NOT_PERMITTED /**< Operation not permitted */
[ 41s] | ^~~~~~~~~~~~~~~~~~~~~~~~~
[ 41s] | TIZEN_ERROR_NOT_SUPPORTED
[ 41s] make[2]: *** [src/CMakeFiles/nnstreamer-edge.dir/build.make:191: src/CMakeFiles/nnstreamer-edge.dir/libnnstreamer-edge/nnstreamer-edge-aitt.c.o] Error 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean that there is a symbol in nnstreamer-edge-aitt.h that refers to aitt_c.h or not?
If yes: include aitt_c.h
If no: don't include aitt_c.h.
Or do you mean that there is a symbol in aitt_c.h that requires including another header before including aitt_c.h?
If yes: fix aitt_c.h or do workaround right before aitt_c.h with proper comments so that we can remove it later. And report to AITT or submit a PR to AITT to fix it.
If no: ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The AITT representative asked me to use a pc file or add -DTIZEN. We are not using aitt pc in CMakeList.txt.
so I will add -DTIZEN
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jaeyun-jung posted a related PR(#196). so I will remove -DTIZEN
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@songgot, 💯 All CI checkers are successfully verified. Thanks.
Suggestion: nns_edge_set_log_level() and nns_edge_log_level_e in nnstreamer-edge.h When the macro for log message is moved to header (for tizen and android), set-log-level and the enumeration would be deleted because we cannot set the logging level. I suggest deleting logging function in nnstreamer-edge.h, if this PR is necessary. |
Okay, thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@songgot, 💯 All CI checkers are successfully verified. Thanks.
Do you have any comments about this PR? |
* @brief Set the logging level. Default value is NNS_EDGE_LOG_INFO. | ||
* @param[in] level The log level to print out. | ||
*/ | ||
void nns_edge_set_log_level (nns_edge_log_level_e level); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just remove this function? How can we set log level after this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Operation is possible without nns_edge_set_log_level().
To be honest, I don't know the intention of this change.. |
@@ -170,7 +169,7 @@ nns_edge_malloc (nns_size_t size) | |||
mem = malloc (size); | |||
|
|||
if (!mem) | |||
nns_edge_loge ("Failed to allocate memory (%llu).", size); | |||
nns_edge_loge ("Failed to allocate memory"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason to change this line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
%lu or %llu is required when building in 32bit and 64bit with gbs.
I tried to solve it with glib API, but nnstreamer-edge does not have glib dependency.
There is also a way to use the C library.
Since there was only one log, I agreed with @gichan-jang to delete it for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nnstreamer-edge/include/nnstreamer-edge.h
Line 28 in ded7b09
typedef uint64_t nns_size_t; |
If it was size_t, you may use %zu, but that's just uint64_t. You may refer to https://stackoverflow.com/questions/30092872/how-to-print-uint64-t-in-gcc too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A major NNStreamer VoC is that error messages do not give you enough info. Please do not reduce info in error messages. Please add more info.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, thank you.
https://github.com/openbsd/src/blob/master/include/inttypes.h
${NNS_EDGE_SRC_DIR}/nnstreamer-edge-util.c | ||
${NNS_EDGE_SRC_DIR}/nnstreamer-edge-queue.c | ||
) | ||
IF (NOT ENABLE_TIZEN) | ||
SET(NNS_EDGE_SRCS ${NNS_EDGE_SRCS} ${NNS_EDGE_SRC_DIR}/nnstreamer-edge-log.c) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the nnstreamer-edge-log.c
excluded when ENABLE_TIZEN
is off?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If not using Tizen or Android, nns_edge_print_log() in nnstreamer-edge-log.c is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@songgot, 💯 All CI checkers are successfully verified. Thanks.
cibot: @songgot, A builder checker could not be completed because one of the checkers is not completed. In order to find out a reason, please go to http://ci.nnstreamer.ai/nnstreamer-edge/ci/repo-workers/pr-checker/191-202312041844230.5980179309845-862b7fc85ee6e680ae95e6cce9f01305cc957d30/. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@songgot, 💯 All CI checkers are successfully verified. Thanks.
When outputting dlog using dlogutil in Tizen, garbage values are output in the format starting with % Signed-off-by: hyunil park <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@songgot, 💯 All CI checkers are successfully verified. Thanks.
When outputting dlog using dlogutil in Tizen, garbage values are output in the format starting with %