mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-12 21:56:54 +00:00
Object Introspection (OI) enables on-demand, hierarchical profiling of objects in arbitrary C/C++ programs with no recompilation.
9e2b48d713
Summary: Changes jitlog to use a memfd, an anonymous in memory file descriptor, rather than a file on disk. Also clean up this fd at the end of an OID run rather than leaving it in the hope it's valid next time. A previous attempt to land this used a `char*` from the OID process space in the remote target syscall. Somehow this works with our integration test target, but not globally. Changed to use the previous behaviour of putting the syscall arg in the empty text segment. In doing this I noticed that the text segment wouldn't be initialised at this point on a fresh process, so we were copying into effectively an uninitialised address. Move the jit log fd setup to after the segment setup accordingly. Test plan: - CI - Tested on an integration test target as before. Works. - Created a new target that definitely doesn't have this string in (simple for loop). Failed before, works now. Example: ```sh $ OID_TEST_ARGS='-fjit-logging' stest OidIntegration.simple_struct ... I1121 02:57:36.136890 500897 OIDebugger.cpp:269] Outputting JIT logs: I1121 02:57:36.136896 500897 OIDebugger.cpp:272] JITLOG: SimpleStruct @00007ffc639be180 I1121 02:57:36.136899 500897 OIDebugger.cpp:272] JITLOG: a @00007ffc639be180 I1121 02:57:36.136901 500897 OIDebugger.cpp:272] JITLOG: obj @00007ffc639be180 I1121 02:57:36.136904 500897 OIDebugger.cpp:272] JITLOG: b @00007ffc639be184 I1121 02:57:36.136905 500897 OIDebugger.cpp:272] JITLOG: obj @00007ffc639be184 I1121 02:57:36.136907 500897 OIDebugger.cpp:272] JITLOG: c @00007ffc639be188 I1121 02:57:36.136909 500897 OIDebugger.cpp:272] JITLOG: obj @00007ffc639be188 I1121 02:57:36.136911 500897 OIDebugger.cpp:278] Finished outputting JIT logs. ... ``` |
||
---|---|---|
.circleci | ||
.github | ||
cmake | ||
examples | ||
extern | ||
include/oi | ||
oi | ||
resources | ||
test | ||
tools | ||
types | ||
website | ||
.clang-format | ||
.clang-tidy | ||
.editorconfig | ||
.git-blame-ignore-revs | ||
.gitignore | ||
.gitmodules | ||
CHANGELOG.md | ||
CMakeLists.txt | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
dev.oid.toml | ||
LICENSE | ||
oss.oid.toml | ||
README.md |
object-introspection
Object Introspection is a memory profiling technology for C++ objects. It provides the ability to dynamically instrument applications to capture the precise memory occupancy of entire object hierarchies including all containers and dynamic allocations. All this with no code modification or recompilation!
For more information on the technology and how to get started applying it to your applications please check out the Object Introspection website.
Join the Object Introspection community
See the CONTRIBUTING file for how to help out.
License
Object Introspection is licensed under the Apache 2.0 License.