-
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
more issues in kernel function support #11
Comments
|
2 . Yes, I mean 'trace' trigger support for replay command. |
For item 2, it was because filter address requires full 64 bit address but file format only saves 48 bit to reduce space. We need to sign-extend the address before giving it to filters. Does below patch fixes the issue?
|
It works fine with above patch. Thanks! |
For item 3, I think below patch should fix it.
|
@honggyukim can you please check the current code and close this issue if it's done? |
@namhyung Yeap, I tested it and found that all the issues are resolved now. Sorry for the late answer. |
Sometimes it's useful to print backtrace or stacktrace by explicitly write a request inside source code. This patch implements stacktrace() function for this. It's implemented in two different versions. In debug mode, it uses an external libunwind library and it's output looks as follows. Stack trace: #1 0x000000449ef9 parse_argspec + 0x5d6 #2 0x00000044b76c parse_argument_spec + 0x70 #3 0x00000044bf58 setup_trigger_action + 0x146 #4 0x0000004329e5 find_dwarf_argspec + 0x153 #5 0x000000432b18 find_auto_argspec + 0x4c #6 0x00000044b102 add_filter + 0x87 #7 0x00000044c1bf add_trigger_entry + 0x15c #8 0x00000044c61f setup_trigger + 0x413 #9 0x00000044c85b uftrace_setup_argument + 0x59 #10 0x00000044e053 build_arg_spec + 0x4f #11 0x00000042a6fe walk_sessions + 0x4a #12 0x00000044e12d setup_fstack_args + 0x7d #13 0x00000043a353 open_data_file + 0x3ff #14 0x0000004171a5 command_replay + 0x7a #15 0x000000407ba9 main + 0x4c3 #16 0x7f4e1df33840 __libc_start_main + 0xf0 #17 0x000000405499 _start + 0x29 In release mode, it's better not to rely on an external library, so it just uses builtin backtrace() function, but it can't print static functions. The example output looks as follows. Stack trace: #1 uftrace(parse_argspec+0x4d1) [0x43dd01] #2 uftrace() [0x43e44c] #3 uftrace(setup_trigger_action+0xb0) [0x43f4e0] #4 uftrace() [0x42a933] #5 uftrace(find_auto_argspec+0x29) [0x42aff9] #6 uftrace() [0x43f2f7] #7 uftrace() [0x43fa20] #8 uftrace() [0x440140] #9 uftrace(walk_sessions+0x39) [0x4248a9] #10 uftrace(setup_fstack_args+0xa6) [0x440bb6] #11 uftrace(open_data_file+0x16f) [0x43012f] #12 uftrace(command_replay+0x59) [0x415ee9] #13 uftrace(main+0x544) [0x40adc4] #14 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f8e3d944840] #15 uftrace(_start+0x29) [0x40aef9] Signed-off-by: Honggyu Kim <honggyu.kp@gmail.com>
Fix unit tests not compiling due to incompatible C standard and incomplete refactoring. Move index declaration outside of for statements Update function name and arguments in test cases Reason: PFTOOLS-5439 * commit 'adbdf3ce30a6f8b80a5805754f047277a54b63ed': unittest: Fix trace on/off unit test unittest: Fix c99 compiler error
@namhyung I've tested some features for kernel function tracing and have some comments as follows:
Please have a look at it.
The text was updated successfully, but these errors were encountered: