{"id":16991682,"url":"https://github.com/julianneswinoga/tracex_parser","last_synced_at":"2025-04-12T04:20:25.895Z","repository":{"id":62591972,"uuid":"531558935","full_name":"julianneswinoga/tracex_parser","owner":"julianneswinoga","description":"Python lib that parses ThreadX trace buffers into both human and machine-readable formats","archived":false,"fork":false,"pushed_at":"2025-01-12T19:20:47.000Z","size":218,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T23:51:19.147Z","etag":null,"topics":["parser","python","threadx","traces"],"latest_commit_sha":null,"homepage":"","language":"Python","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/julianneswinoga.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2022-09-01T14:37:50.000Z","updated_at":"2025-01-12T19:20:47.000Z","dependencies_parsed_at":"2023-02-08T07:01:12.510Z","dependency_job_id":"a905baa5-21b1-4cee-8717-236434e68256","html_url":"https://github.com/julianneswinoga/tracex_parser","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julianneswinoga%2Ftracex_parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julianneswinoga%2Ftracex_parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julianneswinoga%2Ftracex_parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julianneswinoga%2Ftracex_parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/julianneswinoga","download_url":"https://codeload.github.com/julianneswinoga/tracex_parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514382,"owners_count":21116950,"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":["parser","python","threadx","traces"],"created_at":"2024-10-14T03:26:55.317Z","updated_at":"2025-04-12T04:20:25.856Z","avatar_url":"https://github.com/julianneswinoga.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TraceX Parser\n[![Documentation Status](https://readthedocs.org/projects/tracex_parser/badge/?version=latest)](https://tracex-parser.readthedocs.io/en/latest/?badge=latest)\n[![CircleCI](https://circleci.com/gh/julianneswinoga/tracex_parser.svg?style=shield)](https://circleci.com/gh/julianneswinoga/tracex_parser)\n[![Coverage Status](https://coveralls.io/repos/github/julianneswinoga/tracex_parser/badge.svg?branch=master)](https://coveralls.io/github/julianneswinoga/tracex_parser?branch=master)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tracex_parser)](https://pypi.org/project/tracex_parser/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/tracex_parser)](https://pypistats.org/packages/tracex_parser)\n\nThis python package parses ThreadX trace buffers into both human and machine-readable formats.\nDon't know where to begin? Check out the [quick-start](https://tracex-parser.readthedocs.io/en/latest/quickstart.html) documentation.\nMore documentation about ThreadX trace buffers can be found [here](https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/tracex/chapter5.md).\n\n## Install\n### Via `pip`\n```console\n$ python3 -m pip install tracex-parser\n```\n\n### Via `snap`\n\u003e [!NOTE]\n\u003e This installation method only allows you to use the command line file parser, not the Python library\n\n```console\n$ sudo snap install tracex-parser\n$ sudo snap alias tracex-parser.parse-trx parse-trx  # Register the `parse-trx` command, otherwise you will need to use tracex-parser.parse-trx\n$ sudo snap connect tracex-parser:removable-media  # Required to allow reading of files outside of /home\n```\n\n\u003e [!NOTE]\n\u003e Due to how snap packages work, there are restrictions on which files snaps are allowed to access.\n\u003e Currently only `/home`, `/media`, `/run/media`, `/mnt` are able to be read.\n\u003e For example attempting to read a file in `/tmp` will throw a `No such file or directory` error\n\n\n## Example trace buffers\nIn the repository source there are a couple example TraceX traces which can be used to verify that things are working correctly.\n### As a python module\n[documentation](https://tracex-parser.readthedocs.io/en/latest/py-interface.html)\n```pycon\n\u003e\u003e\u003e from tracex_parser.file_parser import parse_tracex_buffer\n\u003e\u003e\u003e events, obj_map = parse_tracex_buffer('./demo_threadx.trx')\n\u003e\u003e\u003e events\n[4265846278:thread 7 threadResume(thread_ptr=thread 6,prev_state=0xd,stack_ptr=0x12980,next_thread=), 4265846441:thread 7 mtxPut(obj_id=mutex 0,owning_thread=0x6adc,own_cnt=0x1,stack_ptr=0x129a0), 4265846566:thread 7 mtxPut(obj_id=mutex 0,owning_thread=0x6adc,own_cnt=0x2,stack_ptr=0x129a0)]\n\u003e\u003e\u003e obj_map[0xeea4]\n{'obj_reg_entry_obj_available **': '0x0', 'obj_reg_entry_obj_type **': '0x1', 'thread_reg_entry_obj_ptr': '0xeea4', 'obj_reg_entry_obj_parameter_1': '0xef4c', 'obj_reg_entry_obj_parameter_2': '0x3fc', 'thread_reg_entry_obj_name': b'System Timer Thread'}\n```\n\n### As a command line utility\n[documentation](https://tracex-parser.readthedocs.io/en/latest/cli-interface.html)\nThe `file_parser` module can also be run as a script, which will provide simple statistics on the trace as well as dumping all the events in the trace.\nIt can be run by either:\n- Running the module manually: `python3 -m tracex_parser.file_parser`\n- Using the newly installed command: `parse-trx`\n\nBoth run methods are identical.\n```console\n$ parse-trx -vvv ./demo_threadx.trx\nParsing ./demo_threadx.trx\ntotal events: 974\nobject registry size: 16\ndelta ticks: 40402\nEvent Histogram:\nqueueSend     493\nqueueReceive  428\nthreadResume  19\nthreadSuspend 16\nmtxPut        4\nisrEnter      3\nisrExit       3\nsemPut        2\nsemGet        2\nmtxGet        2\nthreadSleep   2\nAll events:\n2100:thread 2 queueReceive(queue_ptr=0x6b84,dst_ptr=0x115a0,timeout=WaitForever,enqueued=0x13)\n1939:thread 2 queueReceive(queue_ptr=0x6b84,dst_ptr=0x115a0,timeout=WaitForever,enqueued=0x12)\n1778:thread 2 queueReceive(queue_ptr=0x6b84,dst_ptr=0x115a0,timeout=WaitForever,enqueued=0x11)\n1617:thread 2 queueReceive(queue_ptr=0x6b84,dst_ptr=0x115a0,timeout=WaitForever,enqueued=0x10)\n1456:thread 2 queueReceive(queue_ptr=0x6b84,dst_ptr=0x115a0,timeout=WaitForever,enqueued=0xf)\n...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulianneswinoga%2Ftracex_parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjulianneswinoga%2Ftracex_parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulianneswinoga%2Ftracex_parser/lists"}