• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1--
2-- Copyright 2022 The Android Open Source Project
3--
4-- Licensed under the Apache License, Version 2.0 (the "License");
5-- you may not use this file except in compliance with the License.
6-- You may obtain a copy of the License at
7--
8--     https://www.apache.org/licenses/LICENSE-2.0
9--
10-- Unless required by applicable law or agreed to in writing, software
11-- distributed under the License is distributed on an "AS IS" BASIS,
12-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-- See the License for the specific language governing permissions and
14-- limitations under the License.
15--
16
17-- To get mangled stack profile mappings.
18SELECT RUN_METRIC('android/unsymbolized_frames.sql');
19
20DROP VIEW IF EXISTS chrome_unsymbolized_args_view;
21
22CREATE VIEW chrome_unsymbolized_args_view AS
23SELECT ChromeUnsymbolizedArgs_Arg(
24    'module', spm.name,
25    'build_id', spm.build_id,
26    'address', unsymbolized_arg.rel_pc,
27    'google_lookup_id', spm.google_lookup_id
28) AS arg_proto
29FROM
30  (
31    SELECT arg_rel_pc.rel_pc AS rel_pc, arg_mapping_id.mapping_id AS mapping_id
32    FROM
33      (
34        SELECT arg_set_id, int_value AS rel_pc
35        FROM args
36        WHERE key = "chrome_mojo_event_info.mojo_interface_method.native_symbol.rel_pc"
37      ) arg_rel_pc
38    JOIN
39      (
40        SELECT
41          arg_set_id,
42          int_value AS mapping_id
43        FROM args
44        WHERE key = "chrome_mojo_event_info.mojo_interface_method.native_symbol.mapping_id"
45      ) arg_mapping_id
46      ON arg_rel_pc.arg_set_id = arg_mapping_id.arg_set_id
47  ) unsymbolized_arg
48JOIN mangled_stack_profile_mapping spm
49  ON unsymbolized_arg.mapping_id = spm.id
50WHERE spm.build_id != '';
51
52DROP VIEW IF EXISTS chrome_unsymbolized_args_output;
53
54CREATE VIEW chrome_unsymbolized_args_output AS
55SELECT ChromeUnsymbolizedArgs(
56    'args',
57    (SELECT RepeatedField(arg_proto) FROM chrome_unsymbolized_args_view)
58);
59