/*
 * Copyright (C) 2019 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

syntax = "proto2";

package perfetto.protos;

// QnxConfig is used with trace_qnx_probes build from
// https://github.com/qnx-ports/perfetto
message QnxConfig {
  // The number of buffers that tracelog will init for the QNX trace.
  optional uint32 qnx_kernel_buffers = 1;

  // The number of kernel buffers that tracelog will init for the QNX trace.
  optional uint32 qnx_kernel_kbuffers = 2;

  // Flag indicating whether the QNX kernel tracing should produce wide
  // events which contain additional data or fast events which are most
  // concise. In fast mode we lose the priority information
  optional bool qnx_kernel_wide_events = 3;

  // The number of pages initialized by default the parser's page cache.
  optional uint32 qnx_cache_pages = 4;

  // The max pages the page cache should allocate (must be at least as big)
  // as the qnx_cache_pages value. Using -1 will allow the cache to grow
  // unbounded. The cache will prefer to re-use existing pages so growth will
  // only happen when needed (when parser is not keeping up).
  optional int32 qnx_cache_max_pages = 5;

  // The initial size of the the buffer used to hold the trace header values
  // this dynamic buffer will grow as needed but reallocs can be avoided by
  // selecting an initial size large enough to hold all the initial header
  // data.
  optional uint32 qnx_trace_buffer_init_bytes = 6;
}
