-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
trace: replace all *_wo_note to *_notrace to make api define more approachable #14943
base: master
Are you sure you want to change the base?
Conversation
[Experimental Bot, please feedback here] No, this PR does not fully meet the NuttX requirements. While it provides a summary of the change and testing information, it lacks crucial details. Here's a breakdown of what's missing:
In short, the PR needs to be more thorough and explicit in addressing all the requirements, even if the impact or changes are minimal. The goal is to provide enough information for reviewers to quickly understand and assess the change. |
@@ -1837,7 +1837,7 @@ void sched_note_filter_mode(FAR struct note_filter_named_mode_s *oldm, | |||
irqstate_t irq_mask; | |||
FAR struct note_driver_s **driver; | |||
|
|||
irq_mask = spin_lock_irqsave_wo_note(&g_note_lock); | |||
irq_mask = spin_lock_irqsave_notrace(&g_note_lock); |
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.
but nuttx trace framework name note not trace.
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.
But higher-level interfaces are trace models:
https://github.com/apache/nuttx/blob/master/include/nuttx/trace.h
could we rename trace framework from note to trace?
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.
either way is fine, but we need be consistent.
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 think this may require 2 stages to finish this work:
- refine current code base, rename caller interface from note to trace.
- rename note driver module to trace
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.
yes, I am fine with the proposal. please update the document 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.
the patch doesn't fix the problem I rise.
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.
wo_
was added by Xiaomi. It is not in the history of nuttx. Some developers mistakenly believe that wo
is the abbreviation of write only
. The abbreviation wo(without) is not an English convention. I think we don't need to make any document changes.
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.
Sorry, it isn't added by us but just follow the original code base. The first patch comes from:
commit ab3fa890239399de51e5482e595a751fee249b1c
Author: Masayuki Ishikawa <[email protected]>
Date: Wed Jan 17 13:08:03 2018 +0900
SMP: Introduce spin_lock_wo_note() and spin_unlock_wo_note()
These APIs are used in sched_note.c to protect instumentation data.
The deffrence between these APIs to exsiting spin_lock() and spin_unlock()
is that they do not perform insturumentation to avoid recursive call
when SCHED_INSTRUMENTATION_SPINLOCKS=y.
but xxnote
is more consistent then xxtrace
, since nuttx name the profile api as sched_note
not trace
. If you want to change the term, please change all places.
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.
But why would you allow trace.h
to be merged into nuttx? And the kernel code is also using similar APIs?
https://github.com/apache/nuttx/blob/master/include/nuttx/trace.h
https://github.com/apache/nuttx/blob/master/sched/task/task_init.c#L97
should we rename all trace to note?
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.
Yes, @Gary-Hobson please fix the inconsistence.
…roachable Follow the linux naming style: https://github.com/torvalds/linux/blob/master/include/linux/preempt.h#L237-L242 https://github.com/torvalds/linux/blob/master/include/linux/srcu.h#L221 Signed-off-by: chao an <[email protected]>
Summary
trace: replace all *_wo_note to *_notrace to make api define more approachable
Follow the linux naming style:
https://github.com/torvalds/linux/blob/master/include/linux/preempt.h#L237-L242
https://github.com/torvalds/linux/blob/master/include/linux/srcu.h#L221
Signed-off-by: chao an [email protected]
Impact
N/A
Testing
ci-check