зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1776721 - Improve a few comments around the category generating script r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D150613
This commit is contained in:
Родитель
bd1610b4c3
Коммит
af7ecd3fc8
|
@ -2,8 +2,8 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# This script generates jit/MIROpsGenerated.h (list of MIR instructions)
|
||||
# from MIROps.yaml, as well as MIR op definitions.
|
||||
# This script generates ProfilingCategoryList.h and profiling_categories.rs
|
||||
# files from profiling_categories.yaml.
|
||||
|
||||
import yaml
|
||||
from collections import OrderedDict
|
||||
|
@ -16,7 +16,8 @@ CPP_HEADER_TEMPLATE = """\
|
|||
#ifndef {includeguard}
|
||||
#define {includeguard}
|
||||
|
||||
/* This file is generated by generate_profiling_categories.py. DO NOT EDIT! */
|
||||
/* This file is generated by generate_profiling_categories.py from
|
||||
profiling_categories.yaml. DO NOT EDIT! */
|
||||
|
||||
// Profiler sub-categories are applied to each sampled stack to describe the
|
||||
// type of workload that the CPU is busy with. Only one sub-category can be
|
||||
|
@ -54,7 +55,8 @@ RUST_TEMPLATE = """\
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/* This file is generated by generate_profiling_categories.py. DO NOT EDIT! */
|
||||
/* This file is generated by generate_profiling_categories.py from
|
||||
profiling_categories.yaml. DO NOT EDIT! */
|
||||
|
||||
{contents}\
|
||||
"""
|
||||
|
|
|
@ -27,9 +27,9 @@
|
|||
# Label of the profiling category. This a more human readable string for the
|
||||
# category. Label will be displayed in the Firefox Profiler front-end. But also
|
||||
# this will be used as a Rust enum field (with non-alphanumeric characters
|
||||
# removed) because it's more suitable for Rust enums since name field is a snake
|
||||
# cased field with all caps. This is not idiomatic to rust enum field. On the
|
||||
# other hand, this field produces idiomatic fields.
|
||||
# removed) because it's more idiomatic for Rust enums than name fields (which
|
||||
# are snake cased fields with all caps, which is not idiomatic to rust enum
|
||||
# field).
|
||||
#
|
||||
# color [required]
|
||||
# =====
|
||||
|
@ -56,10 +56,7 @@
|
|||
# sub-category) or should start with parent category name + underscore
|
||||
# (e.g. JS_Parsing).
|
||||
#
|
||||
# label attribute is the same as parent category label attribute. Except that
|
||||
# this field is only used by the default sub-category. This is because the name
|
||||
# of the default sub-category is the same with parent category. label field
|
||||
# ensures that they are different.
|
||||
# label attribute has the same purpose as parent category label attribute.
|
||||
#
|
||||
# For example:
|
||||
# - name: JS
|
||||
|
@ -70,8 +67,8 @@
|
|||
# label: Parsing
|
||||
#
|
||||
# Note that the first sub-category has the same name with the category. This is
|
||||
# the default category. Also note the other categories starting with the category
|
||||
# name + underscore.
|
||||
# the default sub-category. Also note the other sub-categories starting with the
|
||||
# category name + underscore.
|
||||
#
|
||||
|
||||
- name: IDLE
|
||||
|
|
Загрузка…
Ссылка в новой задаче