Home | History | Annotate | Download | only in core

Lines Matching refs:proto

21  * perfetto/config/ftrace/ftrace_config.proto
24 * If you need to make changes here, change the .proto file and then run
41 void FtraceConfig::FromProto(const perfetto::protos::FtraceConfig& proto) {
43 for (const auto& field : proto.ftrace_events()) {
46 sizeof(ftrace_events_.back()) == sizeof(proto.ftrace_events(0)),
53 for (const auto& field : proto.atrace_categories()) {
56 sizeof(atrace_categories_.back()) == sizeof(proto.atrace_categories(0)),
63 for (const auto& field : proto.atrace_apps()) {
65 static_assert(sizeof(atrace_apps_.back()) == sizeof(proto.atrace_apps(0)),
71 static_assert(sizeof(buffer_size_kb_) == sizeof(proto.buffer_size_kb()),
74 static_cast<decltype(buffer_size_kb_)>(proto.buffer_size_kb());
76 static_assert(sizeof(drain_period_ms_) == sizeof(proto.drain_period_ms()),
79 static_cast<decltype(drain_period_ms_)>(proto.drain_period_ms());
80 unknown_fields_ = proto.unknown_fields();
83 void FtraceConfig::ToProto(perfetto::protos::FtraceConfig* proto) const {
84 proto->Clear();
87 proto->add_ftrace_events(
88 static_cast<decltype(proto->ftrace_events(0))>(it));
89 static_assert(sizeof(it) == sizeof(proto->ftrace_events(0)),
94 proto->add_atrace_categories(
95 static_cast<decltype(proto->atrace_categories(0))>(it));
96 static_assert(sizeof(it) == sizeof(proto->atrace_categories(0)),
101 proto->add_atrace_apps(static_cast<decltype(proto->atrace_apps(0))>(it));
102 static_assert(sizeof(it) == sizeof(proto->atrace_apps(0)), "size mismatch");
105 static_assert(sizeof(buffer_size_kb_) == sizeof(proto->buffer_size_kb()),
107 proto->set_buffer_size_kb(
108 static_cast<decltype(proto->buffer_size_kb())>(buffer_size_kb_));
110 static_assert(sizeof(drain_period_ms_) == sizeof(proto->drain_period_ms()),
112 proto->set_drain_period_ms(
113 static_cast<decltype(proto->drain_period_ms())>(drain_period_ms_));
114 *(proto->mutable_unknown_fields()) = unknown_fields_;