{"action":"created","issue":{"url":"https://api.github.com/repos/iovisor/bcc/issues/425","repository_url":"https://api.github.com/repos/iovisor/bcc","labels_url":"https://api.github.com/repos/iovisor/bcc/issues/425/labels{/name}","comments_url":"https://api.github.com/repos/iovisor/bcc/issues/425/comments","events_url":"https://api.github.com/repos/iovisor/bcc/issues/425/events","html_url":"https://github.com/iovisor/bcc/issues/425","id":138291650,"number":425,"title":"Higher-level language support for tracing","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":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-03-03T20:42:33Z","updated_at":"2016-08-03T22:47:56Z","closed_at":null,"body":"bcc has been used successfully for the creation of many tracing tools, and may be thought of as a powerful and explicit language for tool authors. It is, however, verbose, and involves common code constructs that feel like boilerplate, causing many tools to be dozens of lines of code. A high-level language could simplify tool generation.\r\n\r\nA high-level language can also encourage ad hoc analysis: the development of custom instrumentation at the command line (one-liners), beyond the coverage of the tool collection.\r\n\r\nThe value of a high-level tracing language has been explored with other tracing tools in the past. This issue is to discuss if/why/how we develop a high-level language for BPF, which may or may not necessarily be part of bcc.\r\n\r\nOne such project is already underway: https://github.com/iovisor/ply"},"comment":{"url":"https://api.github.com/repos/iovisor/bcc/issues/comments/237398971","html_url":"https://github.com/iovisor/bcc/issues/425#issuecomment-237398971","issue_url":"https://api.github.com/repos/iovisor/bcc/issues/425","id":237398971,"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},"created_at":"2016-08-03T22:47:56Z","updated_at":"2016-08-03T22:47:56Z","body":"That syntax is based on awk, and DTrace is also based on awk. I think awk is a pretty good fit, although someone may find/create another language that works even better.\r\n\r\nIt was suggested on twitter recently to try SQL [1]. Too crazy? Here's the previous example in SQL-ish syntax:\r\n\r\n```\r\nSELECT timestamp_ns / 1000000 AS \"%-18s sync()\" FROM kprobe:sys_sync\r\n```\r\n\r\nNow bitehist.py (from examples/tracing):\r\n\r\n```\r\nSELECT req->__data_len AS log2_hist FROM kprobe:blk_account_io_completion\r\n```\r\n\r\nThey aren't as terrible as I would have guessed. :) I'm not advocating for SQL, but I am advocating to experiment and find something that's great.\r\n\r\nIt's been months since I've commented on this, and in the meantime we've created many new tools, and we have more capabilities. I don't think tool authorship is the biggest problem we'll face. The main problem for many will be what to do with these capabilities. (@agentzh and myself already have a laundry list of things we do in tracing, but I don't think most people do.)\r\n\r\nAs for the role of a new language: if it's not that necessary for tool generation, then it may be best aimed at supporting ad hoc analysis. Perhaps building on @goldshtn's trace and argdist, which already cover most of the common ad hoc use cases.\r\n\r\n[1] https://twitter.com/Kentzo/status/757350220250222594"}}
{"actor":{"display_login":"brendangregg"}}