facebookexperimental / object-introspection

Object Introspection (OI) enables on-demand, hierarchical profiling of objects in arbitrary C/C++ programs with no recompilation.
Apache License 2.0
160 stars 13 forks source link

tbv2: support capture-thrift-isset #462

Closed JakeHillion closed 8 months ago

JakeHillion commented 8 months ago

tbv2: support capture-thrift-isset

Support the capture-thrift-isset feature with TreeBuilder-v2. Fairly minor changes here except the type of the Enum in a template parameter now matters.

We follow the previous behaviour of capturing a value for each field in a struct that has an isset_bitset. This value is a VarInt captured before the C++ contents of the member. It has 3 values: 0 (not set), 1 (set), and 2 (unavailable). These are handled by the processor and represented in the output as false, true, and std::nullopt_t respectively.

Changes:

Test plan:

codecov-commenter commented 8 months ago

Codecov Report

Attention: 21 lines in your changes are missing coverage. Please review.

Comparison is base (4975b6e) 62.44% compared to head (351f2f8) 62.41%.

Files Patch % Lines
oi/CodeGen.cpp 54.28% 10 Missing and 6 partials :warning:
oi/type_graph/DrgnParser.cpp 75.00% 1 Missing and 3 partials :warning:
include/oi/exporters/Json.h 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #462 +/- ## ========================================== - Coverage 62.44% 62.41% -0.03% ========================================== Files 123 123 Lines 12021 12054 +33 Branches 1958 1965 +7 ========================================== + Hits 7507 7524 +17 - Misses 3569 3578 +9 - Partials 945 952 +7 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.