Skip to content
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

libbpf-tools: fix some tools error info and usage #3245

Closed
wants to merge 1 commit into from

Conversation

ethercflow
Copy link
Contributor

  • Fix the error message in the open phase
  • Fix spelling error: ojbect -> object
  • Complete parameter information in usage
  • Capitalize parameters that do not require parameter values ​​for easy memory

Signed-off-by: Wenbo Zhang ethercflow@gmail.com

Signed-off-by: Wenbo Zhang <ethercflow@gmail.com>
Copy link
Contributor

@anakryiko anakryiko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a bunch more cases of arbitrary changing the case of existing command line arguments with no justification. Please provide rationale for the changes in your commit messages, not just the "what".

Also, while I have your attention. Can you please check #3224 (comment)? Would you be able to add that check? Thanks!

"\n"
"EXAMPLES:\n"
" biolatency # summarize block I/O latency as a histogram\n"
" biolatency 1 10 # print 1 second summaries, 10 times\n"
" biolatency -mT 1 # 1s summaries, milliseconds, and timestamps\n"
" biolatency -MT 1 # 1s summaries, milliseconds, and timestamps\n"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

biolatency.py is using -m, why sudden and diverging change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a bunch more cases of arbitrary changing the case of existing command line arguments with no justification. Please provide rationale for the changes in your commit messages, not just the "what".

Oh, my motivation is I think maybe it's easier to remember. Lowercase parameters need parameter values ​​(except -v), and uppercase ones belong to the switch class, so you don't need to add parameter values.

Also, while I have your attention. Can you please check #3224 (comment)? Would you be able to add that check? Thanks!

Oh sorry, I haven't checked the email from iovisor/bcc recently, I missed it. I will look at it later (Maybe weekend).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't heard about such naming convention, tbh. I think the harm of changing existing arguments and, especially, diverging from .py tool, is much bigger. So let's not do such renamings unnecessarily.

And thanks for checking the other PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, I will be consistent with .py tool. Thanks!

"\n"
"EXAMPLES:\n"
" cpudist # summarize on-CPU time as a histogram"
" cpudist -O # summarize off-CPU time as a histogram"
" cpudist 1 10 # print 1 second summaries, 10 times"
" cpudist -mT 1 # 1s summaries, milliseconds, and timestamps"
" cpudist -MT 1 # 1s summaries, milliseconds, and timestamps"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similarly. py version is sticking with -m. What's your rationale for making these incompatible changes?


static const struct argp_option opts[] = {
{ "duration", 'd', "DURATION", 0, "Total duration of trace in seconds" },
{ "extended", 'e', NULL, 0, "Extended fields output" },
{ "extended", 'E', NULL, 0, "Extended fields output" },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems to be libbpf-tools exclusive argument, but again, why changing it in the first place?

@ethercflow ethercflow closed this Jan 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants