aboutsummaryrefslogtreecommitdiff
path: root/src/protozero/filtering/filter_bytecode_generator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/protozero/filtering/filter_bytecode_generator.cc')
-rw-r--r--src/protozero/filtering/filter_bytecode_generator.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/protozero/filtering/filter_bytecode_generator.cc b/src/protozero/filtering/filter_bytecode_generator.cc
index b8a059aca..487534b84 100644
--- a/src/protozero/filtering/filter_bytecode_generator.cc
+++ b/src/protozero/filtering/filter_bytecode_generator.cc
@@ -43,6 +43,14 @@ void FilterBytecodeGenerator::AddSimpleField(uint32_t field_id) {
endmessage_called_ = false;
}
+// Allows a string field which needs to be rewritten using the given chain.
+void FilterBytecodeGenerator::AddFilterStringField(uint32_t field_id) {
+ PERFETTO_CHECK(field_id > last_field_id_);
+ bytecode_.push_back(field_id << 3 | kFilterOpcode_FilterString);
+ last_field_id_ = field_id;
+ endmessage_called_ = false;
+}
+
// Allows a range of simple fields. |range_start| is the id of the first field
// in range, |range_len| the number of fields in the range.
// AddSimpleFieldRange(N,1) is semantically equivalent to AddSimpleField(N).