{"id":28202508,"url":"https://github.com/ergus/extraewin","last_synced_at":"2026-02-11T00:31:52.355Z","repository":{"id":178208586,"uuid":"660954240","full_name":"Ergus/ExtraeWin","owner":"Ergus","description":"Very basic header-only library for C++ instrumentation and create a Paraver Trace.","archived":false,"fork":false,"pushed_at":"2025-06-16T09:42:41.000Z","size":185,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-26T06:37:56.810Z","etag":null,"topics":["cmake","concurrency","cpp","extrae","github-actions","multiplatform","multithreading","parallel","paraver","profiling","testing"],"latest_commit_sha":null,"homepage":"","language":"C++","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/Ergus.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,"zenodo":null}},"created_at":"2023-07-01T10:24:42.000Z","updated_at":"2025-06-16T09:42:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"e7362382-0b74-41e6-bcbe-371bdda142f4","html_url":"https://github.com/Ergus/ExtraeWin","commit_stats":null,"previous_names":["ergus/extraewin"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ergus/ExtraeWin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ergus%2FExtraeWin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ergus%2FExtraeWin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ergus%2FExtraeWin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ergus%2FExtraeWin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ergus","download_url":"https://codeload.github.com/Ergus/ExtraeWin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ergus%2FExtraeWin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29323551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T20:44:44.282Z","status":"ssl_error","status_checked_at":"2026-02-10T20:44:43.393Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cmake","concurrency","cpp","extrae","github-actions","multiplatform","multithreading","parallel","paraver","profiling","testing"],"created_at":"2025-05-17T00:13:59.165Z","updated_at":"2026-02-11T00:31:52.316Z","avatar_url":"https://github.com/Ergus.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Readme\n=======\n\nThis is a very simple multi-platform Instrument based profiler\nintended to work in multi-threaded systems (not intended for\ndistributed memory systems). For more advanced use cases consider\nusing [Extrae](https://tools.bsc.es/extrae) instead of this.\n\nThe main goal is to make it portable into MSWindows and GNU/Linux\nsystems with a very minimal implementation and support for\nmulti-threading. Basically because that's what I need ATM.\n\nEverything in a single header to include without requiring extra\nshared/dynamic libraries.\n\nUnlike sampler profiler this is an instrumentation profiler intended\nto work minimizing the overhead and execution perturbation, and\nproviding more accurate numbers for system call counters.\n\nLimitations\n-----------\n\n- As this is intended to be multi-platform it is not possible to use\nfunction interception in a portable way.\n\n- Due to the nature of the implementation sometimes the trace files\n  may become too big; causing some issues with the resulting sizes.\n\n- It is intended to work only with C++ because it relies on RAII and\n  static thread local storage constructors and destructors.\n\nThe basic steps are:\n--------------------\n\n1. Instrument the code like in the `main.cpp` example code.\n\n\tThe example code includes all the different alternatives to instrument the code.\n\n\tIt is very important to define the `PROFILER_ENABLED` macro **BEFORE** including the \n\t`Profiler.hpp` header.\n\n\t\t- PROFILER_ENABLED = 0 (or not defined) don't trace anything\n\t\t- PROFILER_ENABLED = 1 Emit user defined events (function defined instrumentation and thread init-stop)\n\t\t- PROFILER_ENABLED = 2 Like 1 + dynamic memory allocation events (intercept new and delete)\n\n2. Execute your program. This will create a directory called `TRACEDIR_\u003ctimestamp\u003e` in the current execution path\n\n   The directory contains the traces (in binary format) and some text files with\n   information for the paraver viewer (`Trace.pcf` and `Trace.row`).\n\n3. Process the Traces with the parser executable.\n\n\t```\n\t./Parser.x TRACEDIR_\u003ctimestamp\u003e\n\t```\n\n\tThis will create a [Paraver](https://tools.bsc.es/paraver) trace file:\n\n\t```\n\tTRACEDIR_\u003ctimestamp\u003e/Trace.prv\n\t```\n\nYou can open that file with wxparaver.\n\n\nInstrumenting code\n------------------\n\nAt the moment the events are stored in `uint16_t` types, so the events\nmust be in the range: 1-65535.\n\n- 0 Don't use it!!\n- 1 - 32767 User events manually defined, the user can use any of them.\n- 32768 - 65536 Are reserved for auto-registered functions and internal\n  At the moment there are only 3 predefined events values:\n\t  * 32768 Thread status\n\t  * 32769 Memory allocations\n\t  * 32770 Memory deallocation\n\nTrace example\n-------------\n\nThe Profiler generates the traces in binary format. With a very simple\nformat it is very easy to generate files for visualizer or data\nanalyzers.\n\nThe profiler generates one trace file / thread and main is generally\nin thread 0. For more details about how to parse a trace you can read\nthe code in `Parser.cpp`.\n\nFor the example provided in the `main.cpp` the paraver trace looks like:\n\n![ParaverTrace](images/Trace.png)\n\nParaver y capable to perform some simple data analysis like generate\nhistograms.\n\n![ParaverHistogram1](images/Histogram.png)\n\n![ParaverHistogram2](images/Histogram2.png)\n\nWhen PROFILER_ENABLED = 2 the heap memory allocations are tracked by\nintercepting the `new` and `delete` operators.\n\nWith that information we can build the memory usage graph withing\n`Paraver` or with the provided `memory.py` script.\n\n![MemoryGraph](images/Memory.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fergus%2Fextraewin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fergus%2Fextraewin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fergus%2Fextraewin/lists"}