Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
DAOS-16661 common: Integrate PMDK logging system w/ VOS logging system. #14923
base: master
Are you sure you want to change the base?
DAOS-16661 common: Integrate PMDK logging system w/ VOS logging system. #14923
Changes from 4 commits
149320c
1011420
f9b926d
45e6548
76fe5c6
a516943
224ea5c
c445554
055c40f
8f2b121
6a85d36
c5935f1
3e73bd5
ec17be3
9c1a53e
4672438
4c0b796
a7ad9fa
bd924f6
f1e6c21
7beccb8
1d3f89a
13dd692
2b2b30c
303a42d
ce9fa93
a20d8b5
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This is one example where pulling in PMDK into DAOS would be useful.
Anyway, this can be improved to be more efficient.
Add the following
#define _D_DEBUG_EXPANDED(func, flag, flag_var, ...)
Have _D_DEBUG call this with DD_FLAG(flag, D_LOGFAC) as the flag var.
In your case, you can have a map like the one you have above to each flag var
e.g. &DD_FLAG(DLOG_INFO, D_LOGFAC)
And instead of calling _D_DEBUG, call _D_DEBUG_EXPANDED with *flag_var you saved.
Additionally, one might consider passing these variables down to the lower level (e..g. register_debug_callback(callback, &DD_FLAG(...)). The check can just be if (*flag != 0) inside of pmdk and the upper level will take care of caching the value for the next call.
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
_D_DEBUG_W_SAVED_MASK
macro (instead of_D_DEBUG_EXPANDED
) has been added and thepmdk_log_function()
has been adjusted.