-
Notifications
You must be signed in to change notification settings - Fork 478
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
argument/return value support for (python) script #144
Comments
@namhyung Superb! It works fine for me and the code quality is a lot better now. |
Pushed review/script-args-v2. Changelog:
For example, the following script has a filter for function a and b.
And then script now runs only for a and b.
|
@namhyung Having |
It'd be nice to support regex too. Also I guess using capical letters like "UFTRACE_FUNCS" seems better, thoughts? |
I agree.
Hm.. naming is always difficult but it seems that it requires uncomfortable typing with capital letters. Besides that, can you please rebase and update it first before making more changes? |
What about |
Sure.
That would work too. I cared about a possible name clash with system or user scripts so wanted to have the "uftrace" prefix somehow. Also it's a kind of configuration or setting so it seems natural to use capital letters IMHO. |
I see. I was just trying to find a more intuitive name but |
Just pushed review/script-args-v3. Changelog:
|
It seems that retval is also tuple so I have to get the value |
Pushed review/script-args-v4. Changelog:
With above "filter.py" script, changed "UFTRACE_FUNCS" to "^.$" in order to match functions with single letter name:
|
I think it's good for me. Thanks! |
Pushed review/script-args-v5. Changelog:
For example, following script has its record options to set argument and return value.
Running uftrace record with the script will add those options to the command line.
|
@namhyung Thanks! But it seems that it doesn't parse some options such as |
Yes, it does miss a few of options but
Without the script:
With the script:
|
@namhyung Ah.. you're right. sorry for making confusion. But it would be better to show which option is applied in
|
Hmm.. does it really necessary? I think one can easily see the script to check the additional options when needed.. |
It's not urgent but it's just to make |
It's not urgent at all so better to ignore it as of now. |
Pushed review/script-args-v6. Changelog:
I'm gonna push this into master soon unless some serious issue arises. Please tell me if you find something, thanks! |
Thanks. I think it's good to me. I appreciate your effort! |
It currently lacks the argument/return value info from script. I pushed a code to support them in review/script-args-v1.
I used following test script:
The result is below - I know there're some issues but want to share the current status first.
The text was updated successfully, but these errors were encountered: