{"action":"opened","issue":{"url":"https://api.github.com/repos/LuaJIT/LuaJIT/issues/199","repository_url":"https://api.github.com/repos/LuaJIT/LuaJIT","labels_url":"https://api.github.com/repos/LuaJIT/LuaJIT/issues/199/labels{/name}","comments_url":"https://api.github.com/repos/LuaJIT/LuaJIT/issues/199/comments","events_url":"https://api.github.com/repos/LuaJIT/LuaJIT/issues/199/events","html_url":"https://github.com/LuaJIT/LuaJIT/issues/199","id":164861222,"number":199,"title":"Binary version of -jdump?","user":{"login":"lukego","id":13791,"avatar_url":"https://avatars.githubusercontent.com/u/13791?v=3","gravatar_id":"","url":"https://api.github.com/users/lukego","html_url":"https://github.com/lukego","followers_url":"https://api.github.com/users/lukego/followers","following_url":"https://api.github.com/users/lukego/following{/other_user}","gists_url":"https://api.github.com/users/lukego/gists{/gist_id}","starred_url":"https://api.github.com/users/lukego/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukego/subscriptions","organizations_url":"https://api.github.com/users/lukego/orgs","repos_url":"https://api.github.com/users/lukego/repos","events_url":"https://api.github.com/users/lukego/events{/privacy}","received_events_url":"https://api.github.com/users/lukego/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-11T15:10:46Z","updated_at":"2016-07-11T15:10:46Z","closed_at":null,"body":"I find myself longing for a binary version of `-jdump`. Has anybody ever developed such a thing?\r\n\r\nSpecifically I would like a mechanism to capture generated code that is efficient enough to enable in production and that produces files that can be post-processed conveniently. I am imagining that a binary format based on LuaJIT's internal data structures would fit the bill. (The problems with `-jdump` are that it is expensive to run the string formatting inside the system being observed and that the output is not especially convenient for tools to parse.)\r\n\r\nThe use cases is offline performance analysis of running production systems. For example I should be able to produce reports like `-jdump` and cross-reference them with profiler information and source code even for processes that already started and/or terminated before I decided that I was interested in analyzing them.\r\n\r\nI also want to be able to do things like highlight the relationships between bytecode, IR, and machine code to understand e.g. which part of the program a given machine instruction belongs to. This would require access to other information that may be present inside the LuaJIT heap but is absent from the `-jdump` output.\r\n\r\n(The main alternative I see would be to create a coredump of the running process and inspect that in the spirit of gdb. Would that actually be a better idea?)"}}
{"actor":{"display_login":"lukego"}}