{"id":21707819,"url":"https://github.com/flightaware/lttngtcl","last_synced_at":"2025-03-20T17:22:25.140Z","repository":{"id":66872740,"uuid":"106043515","full_name":"flightaware/lttngtcl","owner":"flightaware","description":"LTTng trace provider which connects to Tcl_CreateTrace","archived":false,"fork":false,"pushed_at":"2017-10-13T20:14:45.000Z","size":63,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":9,"default_branch":"master","last_synced_at":"2023-04-18T10:34:09.241Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"M4","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flightaware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-06T19:38:47.000Z","updated_at":"2023-04-18T10:34:09.242Z","dependencies_parsed_at":"2023-02-23T10:46:10.538Z","dependency_job_id":null,"html_url":"https://github.com/flightaware/lttngtcl","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flightaware%2Flttngtcl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flightaware%2Flttngtcl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flightaware%2Flttngtcl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flightaware%2Flttngtcl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flightaware","download_url":"https://codeload.github.com/flightaware/lttngtcl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244657082,"owners_count":20488714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-25T22:19:23.740Z","updated_at":"2025-03-20T17:22:25.121Z","avatar_url":"https://github.com/flightaware.png","language":"M4","funding_links":[],"categories":[],"sub_categories":[],"readme":"lttngtcl - a Tcl_CreateTrace API connector sending trace data to LTTng\n\nThis TCL extension provides a cmdtrace command which sends the trace data to LTTng.\n\n```\npackage require lttngtcl\n\n::lttng::cmdtrace\n```\n\nLTTng is an open source tracing framework for Linux.  http://lttng.org\n\nTCL provides the C API hook for command tracing callbacks.  This extension sends the\ntrace data into a LTTng trace provider.\n\nUse LTTng you can turn on and off trace tracing on the fly.  You can also send trace data\nover the network.\n\nThe name of the LTTng provider is `tcl:tcl_cmdtrace`\n\nTherefore, there is overhead on the TCL side once ::lttng::cmdtrace is invoked.  \nThe C trace callback will call the LTTng implemention.\n\nhttps://www.tcl.tk/man/tcl8.6/TclLib/CrtTrace.htm\n\n## Installing\n\nInstalls with a standard `autoconf \u0026\u0026 make install`\n\n## H2 Hacking TclInfoFrame into the TCL C API\n\nIf we hack the TCL implementation to export `TclInfoFrame(Tcl_Interp *, CmdFramePtr *)` as `Tcl_InfoFrame(Tcl_Interp *)`, then we\ncan provide a better set of traces.\n\n```\n/* add to generic/tclCmdIL.c */\nTcl_Obj *\nTcl_InfoFrame(Tcl_Interp *interp)\n{\n    Interp *iPtr = (Interp *) interp;\n    if (iPtr \u0026\u0026 iPtr-\u003ecmdFramePtr) {\n\treturn TclInfoFrame(interp, iPtr-\u003ecmdFramePtr);\n    }\n    return NULL;\n}\n\n```\n\nConfigure and build TCL with this patch. Configure this extension with `CFLAGS=-DHAVE_TCL_INFOFRAME ./configure --with-tcl=\u003cpath to patched TCL\u003e`.\n\nThis will implement two additional providers for the data from info.  A file line trace info and the contents of \"info frame\".\n```\ntcl:tcl_cmdtrace   TCL level and cmd passed to the Tcl_CreateTrace callback\ntcl:tcl_linetrace  TCL level, file and line number if available\ntcl:tcl_infotrace  TCL \"info frame\" information\n```\n\n## Using barectf\n\nIn platforms where LTTng does not work, you can generate traces with barectf.\n\nhttps://github.com/efficios/barectf\n\nThe barectf implementation in TCL lttng uses the linux-fs demo platform implementation.  You will need to install barectf.\nYou will also need the source code from git to inline compile the provider.\nThe makefile named Makefile.barectf provides an outline of how to build using barectf.\nRemember that the C code from barectf is portable. You can copy the generated source files from one platform to another and compile.  Just copy the git barectf files also.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflightaware%2Flttngtcl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflightaware%2Flttngtcl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflightaware%2Flttngtcl/lists"}