-
Notifications
You must be signed in to change notification settings - Fork 479
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
automatic argument for well-known functions #173
Comments
Pushed the PoC code to review/auto-args-v1. It uses "auto-args.h" and the "gen-autoargs.py" from the code of @honggyukim. You can just give function name (or pattern) to the
|
Hi @namhyung, As discussed on the last meeting, I'm okay on this interface also with And one more thing I have to tell you is that, I've got the below warning messages when running gcc binary.
We have to limit the length of string or change the buffer to be allocated on heap. I've limitted the length of string to 48 in 0df48da but we can also change the length limit to 64 or more. |
@honggyukim I'm ok with the |
Pushed review/auto-args-v2. Changelog:
|
@namhyung I'm very happy with review/auto-args-v2. :) |
@namhyung , Thanks for doing this work! I tested v2 branch and I found a trivial thing. The below return string values of But, I expected a string "/home/taeung/git/opensource/nmap". Is it a bug ?
|
Hi @Taeung, You can see the below example:
If you compile and run it.
As you can see the return value of |
@honggyukim , Thank you for detailed explanation, Understood ! 😄 |
But strange thing is in the your output log below:
It's strange that how come the |
@honggyukim that's because of internal encoding for NULL string (0xffffffff). If the buffer was filled with same value, it shows NULL. Maybe it'd be better using a different encoding as it's too common. |
@namhyung Oh.. I see. Thanks for the info. |
Hi @namhyung, is there any other issue for this feature? |
It needs to save the auto argspec in a data file so that it can be parsed later without a problem (even in a different version of uftrace). |
Pushed to review/auto-args-v3. Changelog:
|
Pushed to review/auto-args-v4. Changelog:
The following example override pthread_create to show function pointer (3rd arg) only.
|
Thanks for doing this! I think it's very good to me but I'm just wondering why you included |
I don't want to build it unnecessarily. Some (old/small) system might lack python runtime as well. |
Right, understood it. I'm fine with it then. Thanks a lot! :) |
While #158 and #171 from @honggyukim added support for automatic argument and return value record/display with
--auto-args
option, I'd like to suggest a different way to use it.For me, argument is additional information takes some time and space when recording. So it needs to be controlled to reduce performance impact as long as possible. Instead of enabling all know arguments and return values for those functions, making it selectable with
-A
and-R
option would be the way to go IMHO.But I'm still open to other opinions. Please suggest if you could come up with a new idea.
The text was updated successfully, but these errors were encountered: