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

displaying argument type name for pointers #1258

Open
honggyukim opened this issue May 13, 2021 · 1 comment
Open

displaying argument type name for pointers #1258

honggyukim opened this issue May 13, 2021 · 1 comment

Comments

@honggyukim
Copy link
Collaborator

honggyukim commented May 13, 2021

I see that uftrace replay without argument info is useful especially with type info in struct types. However, we see many arguments in pointer types but these are not useful but makes the output look more complicated.

Instead, I would like to suggest to print the type of pointer info together. For example, if there is a program as follows.

$ cat typename.cpp
struct AAA {};
struct BBB {};
struct CCC {};

void foo(AAA *aaa, BBB *bbb, CCC *ccc) {}

AAA aaa;

int main()
{
        BBB bbb;
        CCC ccc;
        foo(&aaa, &bbb, &ccc);
}

The tracing output looks as follows.

$ clang++ -pg -g typename.cpp

$ uftrace -a a.out
# DURATION     TID     FUNCTION
            [131885] | main() {
   0.916 us [131885] |   foo(&aaa, 0xffffc4bf333f, 0xffffc4bf333e);
   1.959 us [131885] | } = 0; /* main */

But I would like to make it as follows.

$ uftrace -a a.out
# DURATION     TID     FUNCTION
            [131885] | main() {
   0.916 us [131885] |   foo((AAA*)&aaa, (BBB*)0xffffc4bf333f, (CCC*)0xffffc4bf333e);
   1.959 us [131885] | } = 0; /* main */

This type info will give more information about the function signature and their type info.

@honggyukim
Copy link
Collaborator Author

honggyukim commented May 13, 2021

This may be handled similarly with 843a2ca.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant