Commit d42d0f6
authored
Change the marker schema to accept a description and get rid of the notion of static fields (#5385)
In a marker schema, the `data` array can currently hold both "dynamic"
and "static" fields. Dynamic fields get their value from each marker,
static fields have a single fixed value.
In the years since the marker schema has been available, the only thing
we've used "static" fields for is a "description" field.
So I think we should just have an actual description field which is
separate from schema.data. And we should remove generic "static" fields.
This simplifies the format, and it also simplifies our code because we
can iterate over the fields without having to check whether a field is a
static or a dynamic field - Flow was requiring extra verbose checks in
this case because the two field types don't have a shared discriminator
property.
This change does make the schema a little less expressive, but nobody
was making use of the extra expressivity.
Also, at some point we'll want to move to a more compact representation
of markers in the profile JSON by not repeating the field keys on every
marker. One way to do this would be to store marker field values in an
array, where each array value maps to the field at the corresponding
index. This representation makes more sense if the fields array only
contains fields that actually get their value from the marker.
This PR only changes the processed format. The Gecko profile format
remains unchanged. We can change it in a follow-up.
On the Gecko side, we currently have an old and [a new
way](https://bugzilla.mozilla.org/show_bug.cgi?id=1869835) to declare
marker schemas. The new way got rid of static fields too and just
accepts [a
description](https://searchfox.org/mozilla-central/rev/f256e50e068136275c1a2aff827aeddc92a75e07/mozglue/baseprofiler/public/BaseProfilerMarkersPrerequisites.h#1089-1091)
(but still outputs the description as a static field).File tree
27 files changed
+1230
-855
lines changed- docs-developer
- src
- app-logic
- components/tooltip
- profile-logic
- import
- test
- components
- __snapshots__
- fixtures/profiles
- integration/symbolicator-cli/__snapshots__
- store
- __snapshots__
- unit
- __snapshots__
- types
27 files changed
+1230
-855
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
9 | 19 | | |
10 | 20 | | |
11 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
245 | | - | |
246 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
| 250 | + | |
277 | 251 | | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
289 | 256 | | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
290 | 281 | | |
291 | 282 | | |
292 | 283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
939 | 939 | | |
940 | 940 | | |
941 | 941 | | |
942 | | - | |
| 942 | + | |
943 | 943 | | |
944 | 944 | | |
945 | 945 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1434 | 1434 | | |
1435 | 1435 | | |
1436 | 1436 | | |
1437 | | - | |
1438 | | - | |
1439 | | - | |
1440 | | - | |
1441 | | - | |
1442 | | - | |
1443 | | - | |
1444 | | - | |
1445 | | - | |
1446 | | - | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
1447 | 1441 | | |
1448 | | - | |
1449 | | - | |
1450 | | - | |
1451 | | - | |
1452 | | - | |
1453 | | - | |
1454 | | - | |
1455 | | - | |
1456 | | - | |
1457 | | - | |
1458 | | - | |
1459 | | - | |
1460 | | - | |
1461 | | - | |
1462 | | - | |
1463 | | - | |
1464 | | - | |
1465 | | - | |
1466 | | - | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
1467 | 1460 | | |
1468 | 1461 | | |
1469 | 1462 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
52 | 48 | | |
53 | 49 | | |
54 | 50 | | |
| |||
58 | 54 | | |
59 | 55 | | |
60 | 56 | | |
61 | | - | |
| 57 | + | |
62 | 58 | | |
63 | 59 | | |
64 | 60 | | |
65 | 61 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
| 62 | + | |
72 | 63 | | |
73 | 64 | | |
74 | 65 | | |
| |||
78 | 69 | | |
79 | 70 | | |
80 | 71 | | |
81 | | - | |
| 72 | + | |
82 | 73 | | |
83 | 74 | | |
84 | 75 | | |
| |||
212 | 203 | | |
213 | 204 | | |
214 | 205 | | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
220 | 209 | | |
221 | 210 | | |
222 | 211 | | |
| |||
634 | 623 | | |
635 | 624 | | |
636 | 625 | | |
637 | | - | |
| 626 | + | |
638 | 627 | | |
639 | 628 | | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
640 | 634 | | |
641 | 635 | | |
642 | 636 | | |
643 | 637 | | |
644 | 638 | | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | 639 | | |
651 | 640 | | |
652 | 641 | | |
| |||
663 | 652 | | |
664 | 653 | | |
665 | 654 | | |
666 | | - | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
| 655 | + | |
671 | 656 | | |
672 | 657 | | |
673 | 658 | | |
| |||
691 | 676 | | |
692 | 677 | | |
693 | 678 | | |
694 | | - | |
| 679 | + | |
695 | 680 | | |
696 | | - | |
| 681 | + | |
697 | 682 | | |
698 | 683 | | |
699 | 684 | | |
| |||
0 commit comments