Support external (i.e. user-defined) trace annotations (#195)
* Support external (i.e. user-defined) trace annotations
- tweaked the python examples to be more balanced
- updated the user-api example to conform to user API changes
- moved the get/set for State and ThreadState to state.{hpp,cpp}
- introduced user-provided trace annotations
- added perfetto python category
- moved coverage impl files around
- created enumerations for mapping category enums to category types
- created enumerations for mapping annotation type enums to annotation values
- moved tracing::add_perfetto_annotations to tracing/annotation.hpp
- utility make_index_sequence_range
- libomnitrace-dl: omnitrace_push_category_region
- libomnitrace-dl: omnitrace_pop_category_region
- libomnitrace-user: omnitrace_user_push_annotated_region
- libomnitrace-user: omnitrace_user_pop_annotated_region
- libpyomnitrace: support extra annotations via annotate_trace config value
- filename
- line
- last attempted instr in bytecode (lasti)
- argcount
- num local variables
- stacksize
- omnitrace-python: -a / --annotate-traces option
* tweak ubuntu-focal workflow
* Fix installation of omnitrace-user headers
* ubuntu-focal-codecov workflow update
- Install texinfo
* Update timemory submodule
Dieser Commit ist enthalten in:
committet von
GitHub
Ursprung
1b8f09aa2d
Commit
642b6b95ca
@@ -66,6 +66,40 @@ omnitrace_pop_region(const char* _name)
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern "C" int
|
||||
omnitrace_push_category_region(omnitrace_category_t _category, const char* _name,
|
||||
omnitrace_annotation_t* _annotations,
|
||||
size_t _annotation_count)
|
||||
{
|
||||
try
|
||||
{
|
||||
omnitrace_push_category_region_hidden(_category, _name, _annotations,
|
||||
_annotation_count);
|
||||
} catch(std::exception& _e)
|
||||
{
|
||||
OMNITRACE_VERBOSE_F(1, "Exception caught: %s\n", _e.what());
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern "C" int
|
||||
omnitrace_pop_category_region(omnitrace_category_t _category, const char* _name,
|
||||
omnitrace_annotation_t* _annotations,
|
||||
size_t _annotation_count)
|
||||
{
|
||||
try
|
||||
{
|
||||
omnitrace_pop_category_region_hidden(_category, _name, _annotations,
|
||||
_annotation_count);
|
||||
} catch(std::exception& _e)
|
||||
{
|
||||
OMNITRACE_VERBOSE_F(1, "Exception caught: %s\n", _e.what());
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern "C" void
|
||||
omnitrace_init_library(void)
|
||||
{
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren