-
Notifications
You must be signed in to change notification settings - Fork 473
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
XDP User Plugin Format changes #7555
Conversation
Signed-off-by: Nishant Mysore <nishraptor@gmail.com>
Signed-off-by: Nishant Mysore <nishraptor@gmail.com>
Signed-off-by: Nishant Mysore <nishraptor@gmail.com>
Build Passed! |
Signed-off-by: Nishant Mysore <nishraptor@gmail.com>
Signed-off-by: Nishant Mysore <nishraptor@gmail.com>
extern "C" | ||
XDP_EXPORT | ||
void user_event_end_cb(unsigned int functionID) ; | ||
extern "C" XDP_EXPORT void user_event_end_cb(unsigned int functionID); |
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.
Think It's preferable and to put exports and externs on separate lines.
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, XRT code also uses separate lines.
VTFEvent* event = new UserRange( | ||
start, static_cast<double>(timestamp), | ||
false, // isStart | ||
0, 0); |
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 makes sense. However some minor issues:
- We use 2 spaces for indentation. 4 isn't consistent with that.
- Also, I'd propose the end bracket to be on new line for even more clarity.
VTFEvent* event = new UserRange (
start, static_cast(timestamp),
false, // isStart
0, 0
);
db->getStaticInfo().addOpenedFile(w->getcurrentFileName(), "VP_TRACE"); | ||
} | ||
db->unregisterPlugin(this) ; | ||
db->unregisterPlugin(this); | ||
} | ||
UserEventsPlugin::live = false; | ||
} | ||
|
||
void UserEventsPlugin::writeAll(bool openNewFiles) |
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.
XRT code also puts class types on a separate line like:
void UserEventsPlugin::
writeAll(bool openNewFiles)
I'd propose we follow that.
|
||
const char* labelStr = (label == nullptr) ? "" : label ; | ||
const char* tooltipStr = (tooltip == nullptr) ? "" : tooltip ; |
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 it's okay to add extra spaces for sake of readability
Build Passed! |
Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered
Format changes for User Plugin