<commit_before>/*
 * Copyright (C) 2018 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";
option optimize_for = LITE_RUNTIME;

package perfetto.protos;

message ProfilePacket {
  // either a function or library name.
  repeated InternedString strings = 1;
  message InternedString {
    optional uint64 id = 1;
    optional string str = 2;
  }

  repeated Frame frames = 2;
  message Frame {
    optional uint64 id = 1;  // Interning key
    // E.g. "fopen"
    optional uint64 function_name_id = 2;  // id of string.
    optional uint64 mapping_id = 3;
    optional uint64 rel_pc = 4;
  }

  repeated Callstack callstacks = 3;
  message Callstack {
    optional uint64 id = 1;
    // Frames of this callstack. Bottom frame first.
    repeated uint64 frame_ids = 2;
  }

  repeated Mapping mappings = 4;
  message Mapping {
    optional uint64 id = 1;  // Interning key.
    optional uint64 build_id = 2;
    optional uint64 offset = 3;
    optional uint64 start = 4;
    optional uint64 end = 5;
    optional uint64 load_bias = 6;
    // E.g. ["system", "lib64", "libc.so"]
    repeated uint64 path_string_ids = 7;  // id of string.
  }

  message HeapSample {
    optional uint64 callstack_id = 1;
    // bytes allocated at this frame and in functions called by it.
    optional uint64 cumulative_allocated = 2;
    // bytes freed at this frame and in functions called by it.
    optional uint64 cumulative_freed = 3;
    optional uint64 timestamp = 4;  // timestamp [opt]
    optional uint64 alloc_count = 5;
    optional uint64 free_count = 6;
  }

  repeated ProcessHeapSamples process_dumps = 5;
  message ProcessHeapSamples {
    optional uint64 pid = 1;
    repeated HeapSample samples = 2;
  }
}
<commit_msg>profiling: Change build_id field to bytes.<commit_after>/*
 * Copyright (C) 2018 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";
option optimize_for = LITE_RUNTIME;

package perfetto.protos;

message ProfilePacket {
  // either a function or library name.
  repeated InternedString strings = 1;
  message InternedString {
    optional uint64 id = 1;
    optional string str = 2;
  }

  repeated Frame frames = 2;
  message Frame {
    optional uint64 id = 1;  // Interning key
    // E.g. "fopen"
    optional uint64 function_name_id = 2;  // id of string.
    optional uint64 mapping_id = 3;
    optional uint64 rel_pc = 4;
  }

  repeated Callstack callstacks = 3;
  message Callstack {
    optional uint64 id = 1;
    // Frames of this callstack. Bottom frame first.
    repeated uint64 frame_ids = 2;
  }

  repeated Mapping mappings = 4;
  message Mapping {
    optional uint64 id = 1;  // Interning key.
    optional bytes build_id = 2;
    optional uint64 offset = 3;
    optional uint64 start = 4;
    optional uint64 end = 5;
    optional uint64 load_bias = 6;
    // E.g. ["system", "lib64", "libc.so"]
    repeated uint64 path_string_ids = 7;  // id of string.
  }

  message HeapSample {
    optional uint64 callstack_id = 1;
    // bytes allocated at this frame and in functions called by it.
    optional uint64 cumulative_allocated = 2;
    // bytes freed at this frame and in functions called by it.
    optional uint64 cumulative_freed = 3;
    optional uint64 timestamp = 4;  // timestamp [opt]
    optional uint64 alloc_count = 5;
    optional uint64 free_count = 6;
  }

  repeated ProcessHeapSamples process_dumps = 5;
  message ProcessHeapSamples {
    optional uint64 pid = 1;
    repeated HeapSample samples = 2;
  }
}

{'fraction_non_alphanumeric': 0.07578397212543554, 'fraction_numerical': 0.03484320557491289, 'mean_word_length': 2.990443092962641, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3516596', 'n_tokens_mistral': 1447, 'n_tokens_neox': 1328, 'n_words': 551}