{"action":"created","issue":{"url":"https://api.github.com/repos/iovisor/bcc/issues/854","repository_url":"https://api.github.com/repos/iovisor/bcc","labels_url":"https://api.github.com/repos/iovisor/bcc/issues/854/labels{/name}","comments_url":"https://api.github.com/repos/iovisor/bcc/issues/854/comments","events_url":"https://api.github.com/repos/iovisor/bcc/issues/854/events","html_url":"https://github.com/iovisor/bcc/issues/854","id":195169894,"number":854,"title":"trace.py to have timestamp options","user":{"login":"brendangregg","id":1101211,"avatar_url":"https://avatars.githubusercontent.com/u/1101211?v=3","gravatar_id":"","url":"https://api.github.com/users/brendangregg","html_url":"https://github.com/brendangregg","followers_url":"https://api.github.com/users/brendangregg/followers","following_url":"https://api.github.com/users/brendangregg/following{/other_user}","gists_url":"https://api.github.com/users/brendangregg/gists{/gist_id}","starred_url":"https://api.github.com/users/brendangregg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendangregg/subscriptions","organizations_url":"https://api.github.com/users/brendangregg/orgs","repos_url":"https://api.github.com/users/brendangregg/repos","events_url":"https://api.github.com/users/brendangregg/events{/privacy}","received_events_url":"https://api.github.com/users/brendangregg/received_events","type":"User","site_admin":false},"labels":[{"id":499750370,"url":"https://api.github.com/repos/iovisor/bcc/labels/new%20option","name":"new option","color":"006b75","default":false},{"id":262255511,"url":"https://api.github.com/repos/iovisor/bcc/labels/prio:low","name":"prio:low","color":"bfe5bf","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-12-13T06:05:27Z","updated_at":"2016-12-19T10:22:23Z","closed_at":null,"body":"Something like:\r\n\r\n```\r\n  -T, --time            include time column on output (HH:MM:SS)\r\n  -t, --timestamp       include timestamp on output (seconds.fraction)\r\n```\r\n\r\nWhich might mean dropping the current timestamp column and only including it with -T.\r\n\r\nHere's why I was prompted:\r\n\r\n```\r\n# ./trace.py 'p::__dev_get_by_name \"lookup: %s\", arg2' 'r::__dev_get_by_name \"returned: 0x%x\", retval'\r\nTIME     PID    TID    COMM         FUNC             -\r\n00:46:46 1703   1703   snmpd        __dev_get_by_name returned: 0xac89f000\r\n00:46:46 1703   1703   snmpd        __dev_get_by_name returned: 0xa4bc2000\r\n00:46:46 1703   1703   snmpd        __dev_get_by_name returned: 0xa4bc2000\r\n00:46:46 1703   1703   snmpd        __dev_get_by_name lookup: lo\r\n00:46:46 1703   1703   snmpd        __dev_get_by_name lookup: eth0\r\n00:46:46 1703   1703   snmpd        __dev_get_by_name lookup: eth0\r\n00:46:49 1703   1703   snmpd        __dev_get_by_name returned: 0xac89f000\r\n00:46:49 1703   1703   snmpd        __dev_get_by_name returned: 0xa4bc2000\r\n00:46:49 1703   1703   snmpd        __dev_get_by_name lookup: lo\r\n00:46:49 1703   1703   snmpd        __dev_get_by_name lookup: eth0\r\n00:46:49 1703   1703   snmpd        __dev_get_by_name lookup: eth0\r\n00:46:49 1703   1703   snmpd        __dev_get_by_name returned: 0xa4bc2000\r\n```\r\n\r\nIt's pretty awesome that I can trace the entry and return value so easily (BTW, you can reproduce this just by running \"ifconfig lo0\" in another window). But with output like the above, it's mixed up (I think), and I can't easily associate the entry to the return. With a -t option, and sufficient resolution (microseconds) I could sort by time and see what happened on the same PID/TIDs."},"comment":{"url":"https://api.github.com/repos/iovisor/bcc/issues/comments/267929932","html_url":"https://github.com/iovisor/bcc/issues/854#issuecomment-267929932","issue_url":"https://api.github.com/repos/iovisor/bcc/issues/854","id":267929932,"user":{"login":"goldshtn","id":1685437,"avatar_url":"https://avatars.githubusercontent.com/u/1685437?v=3","gravatar_id":"","url":"https://api.github.com/users/goldshtn","html_url":"https://github.com/goldshtn","followers_url":"https://api.github.com/users/goldshtn/followers","following_url":"https://api.github.com/users/goldshtn/following{/other_user}","gists_url":"https://api.github.com/users/goldshtn/gists{/gist_id}","starred_url":"https://api.github.com/users/goldshtn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goldshtn/subscriptions","organizations_url":"https://api.github.com/users/goldshtn/orgs","repos_url":"https://api.github.com/users/goldshtn/repos","events_url":"https://api.github.com/users/goldshtn/events{/privacy}","received_events_url":"https://api.github.com/users/goldshtn/received_events","type":"User","site_admin":false},"created_at":"2016-12-19T10:22:23Z","updated_at":"2016-12-19T10:22:23Z","body":"@brendangregg There was a `-t` already, which filtered by thread id. Renamed to `-L`, and then added `-T` and `-t` for time and timestamp, respectively -- see #865."}}
{"actor":{"display_login":"goldshtn"}}