forked from iai-callgrind/iai-callgrind
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsummary.v2.schema.json
661 lines (661 loc) · 20.9 KB
/
summary.v2.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
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
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "BenchmarkSummary",
"description": "The `BenchmarkSummary` containing all the information of a single benchmark run\n\nThis includes produced files, recorded callgrind events, performance regressions ...",
"type": "object",
"required": [
"benchmark_exe",
"benchmark_file",
"function_name",
"kind",
"module_path",
"package_dir",
"project_root",
"tool_summaries",
"version"
],
"properties": {
"benchmark_exe": {
"description": "The path to the compiled and executable benchmark file",
"type": "string"
},
"benchmark_file": {
"description": "The path to the benchmark file",
"type": "string"
},
"callgrind_summary": {
"description": "The summary of the callgrind run",
"anyOf": [
{
"$ref": "#/definitions/CallgrindSummary"
},
{
"type": "null"
}
]
},
"details": {
"description": "More details describing this benchmark run",
"type": ["string", "null"]
},
"function_name": {
"description": "The name of the function under test",
"type": "string"
},
"id": {
"description": "The user provided id of this benchmark",
"type": ["string", "null"]
},
"kind": {
"description": "Whether this summary describes a library or binary benchmark",
"allOf": [
{
"$ref": "#/definitions/BenchmarkKind"
}
]
},
"module_path": {
"description": "The rust path in the form `bench_file::group::bench`",
"type": "string"
},
"package_dir": {
"description": "The directory of the package",
"type": "string"
},
"project_root": {
"description": "The project's root directory",
"type": "string"
},
"summary_output": {
"description": "The destination and kind of the summary file",
"anyOf": [
{
"$ref": "#/definitions/SummaryOutput"
},
{
"type": "null"
}
]
},
"tool_summaries": {
"description": "The summary of other valgrind tool runs",
"type": "array",
"items": {
"$ref": "#/definitions/ToolSummary"
}
},
"version": {
"description": "The version of this format. Only backwards incompatible cause an increase of the version",
"type": "string"
}
},
"definitions": {
"Baseline": {
"description": "A `Baseline` depending on the [`BaselineKind`] which points to the corresponding path\n\nThis baseline is used for comparisons with the new output of valgrind tools.",
"type": "object",
"required": ["kind", "path"],
"properties": {
"kind": {
"description": "The kind of the `Baseline`",
"allOf": [
{
"$ref": "#/definitions/BaselineKind"
}
]
},
"path": {
"description": "The path to the file which is used to compare against the new output",
"type": "string"
}
}
},
"BaselineKind": {
"description": "The `BaselineKind` describing the baseline\n\nCurrently, iai-callgrind can only compare callgrind output with `.old` files.",
"oneOf": [
{
"description": "Compare new against `*.old` output files",
"type": "string",
"enum": ["Old"]
},
{
"description": "Compare new against a named baseline",
"type": "object",
"required": ["Name"],
"properties": {
"Name": {
"$ref": "#/definitions/BaselineName"
}
},
"additionalProperties": false
}
]
},
"BaselineName": {
"type": "string"
},
"BenchmarkKind": {
"description": "The `BenchmarkKind`, differentiating between library and binary benchmarks",
"oneOf": [
{
"description": "A library benchmark",
"type": "string",
"enum": ["LibraryBenchmark"]
},
{
"description": "A binary benchmark",
"type": "string",
"enum": ["BinaryBenchmark"]
}
]
},
"CallgrindRegressionSummary": {
"description": "The `CallgrindRegressionSummary` describing a single event based performance regression",
"type": "object",
"required": ["diff_pct", "event_kind", "limit", "new", "old"],
"properties": {
"diff_pct": {
"description": "The difference between new and old in percent",
"type": "number",
"format": "double"
},
"event_kind": {
"description": "The [`EventKind`] which is affected by a performance regression",
"allOf": [
{
"$ref": "#/definitions/EventKind"
}
]
},
"limit": {
"description": "The value of the limit which was exceeded to cause a performance regression",
"type": "number",
"format": "double"
},
"new": {
"description": "The value of the new benchmark run",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"old": {
"description": "The value of the old benchmark run",
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
}
},
"CallgrindRunSummary": {
"description": "The `CallgrindRunSummary` containing the recorded events, performance regressions of a single callgrind run",
"type": "object",
"required": ["command", "events", "regressions"],
"properties": {
"baseline": {
"description": "If present, the `Baseline` used to compare the new with the old output",
"anyOf": [
{
"$ref": "#/definitions/Baseline"
},
{
"type": "null"
}
]
},
"command": {
"description": "The executed command extracted from Valgrind output",
"type": "string"
},
"events": {
"description": "All recorded costs for `EventKinds`",
"allOf": [
{
"$ref": "#/definitions/CostsSummary_for_EventKind"
}
]
},
"regressions": {
"description": "All detected performance regressions",
"type": "array",
"items": {
"$ref": "#/definitions/CallgrindRegressionSummary"
}
}
}
},
"CallgrindSummary": {
"description": "The `CallgrindSummary` summarizes all callgrind runs",
"type": "object",
"required": ["flamegraphs", "log_paths", "out_paths", "summaries"],
"properties": {
"flamegraphs": {
"description": "The summaries of possibly created flamegraphs",
"type": "array",
"items": {
"$ref": "#/definitions/FlamegraphSummary"
}
},
"log_paths": {
"description": "The paths to the `*.log` files",
"type": "array",
"items": {
"type": "string"
}
},
"out_paths": {
"description": "The paths to the `*.old` files",
"type": "array",
"items": {
"type": "string"
}
},
"summaries": {
"description": "The summaries of all callgrind runs",
"type": "array",
"items": {
"$ref": "#/definitions/CallgrindRunSummary"
}
}
}
},
"CostsDiff": {
"description": "The `CostsDiff` describes the difference between an single optional `new` and `old` cost as percentage and factor.\n\nThere is either a `new` or an `old` value present. Never can both be absent. If both values are present, then there is also a `diff_pct` and `factor` present.",
"type": "object",
"properties": {
"diff_pct": {
"description": "The difference between new and old in percent",
"type": ["number", "null"],
"format": "double"
},
"factor": {
"description": "The difference between new and old expressed as a factor",
"type": ["number", "null"],
"format": "double"
},
"new": {
"description": "The value of the new cost",
"type": ["integer", "null"],
"format": "uint64",
"minimum": 0.0
},
"old": {
"description": "The value of the old cost",
"type": ["integer", "null"],
"format": "uint64",
"minimum": 0.0
}
}
},
"CostsSummary_for_EventKind": {
"description": "The `CostsSummary` contains all differences for affected [`EventKind`]s",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/CostsDiff"
}
},
"CostsSummary_for_String": {
"description": "The `CostsSummary` contains all differences for affected [`EventKind`]s",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/CostsDiff"
}
},
"ErrorSummary": {
"description": "The `ErrorSummary` of tools which have it (Memcheck, DRD, Helgrind)\n\nThe `ErrorSummary` is extracted from the `ERROR SUMMARY` line in the log file output.",
"type": "object",
"required": ["contexts", "errors", "supp_contexts", "supp_errors"],
"properties": {
"contexts": {
"description": "The number of contexts in which the errors appeared",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"errors": {
"description": "The number of total errors",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"supp_contexts": {
"description": "The number of contexts from suppressed errors",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"supp_errors": {
"description": "The number of suppressed errors",
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
}
},
"EventKind": {
"description": "All `EventKind`s callgrind produces and additionally some derived events\n\nDepending on the options passed to Callgrind, these are the events that Callgrind can produce. See the [Callgrind documentation](https://valgrind.org/docs/manual/cl-manual.html#cl-manual.options) for details.",
"oneOf": [
{
"description": "The default event. I cache reads (which equals the number of instructions executed)",
"type": "string",
"enum": ["Ir"]
},
{
"description": "The number of system calls done (--collect-systime=yes)",
"type": "string",
"enum": ["SysCount"]
},
{
"description": "The elapsed time spent in system calls (--collect-systime=yes)",
"type": "string",
"enum": ["SysTime"]
},
{
"description": "The cpu time spent during system calls (--collect-systime=nsec)",
"type": "string",
"enum": ["SysCpuTime"]
},
{
"description": "The number of global bus events (--collect-bus=yes)",
"type": "string",
"enum": ["Ge"]
},
{
"description": "D Cache reads (which equals the number of memory reads) (--cache-sim=yes)",
"type": "string",
"enum": ["Dr"]
},
{
"description": "D Cache writes (which equals the number of memory writes) (--cache-sim=yes)",
"type": "string",
"enum": ["Dw"]
},
{
"description": "I1 cache read misses (--cache-sim=yes)",
"type": "string",
"enum": ["I1mr"]
},
{
"description": "LL cache instruction read misses (--cache-sim=yes)",
"type": "string",
"enum": ["ILmr"]
},
{
"description": "D1 cache read misses (--cache-sim=yes)",
"type": "string",
"enum": ["D1mr"]
},
{
"description": "LL cache data read misses (--cache-sim=yes)",
"type": "string",
"enum": ["DLmr"]
},
{
"description": "D1 cache write misses (--cache-sim=yes)",
"type": "string",
"enum": ["D1mw"]
},
{
"description": "LL cache data write misses (--cache-sim=yes)",
"type": "string",
"enum": ["DLmw"]
},
{
"description": "Derived event showing the L1 hits (--cache-sim=yes)",
"type": "string",
"enum": ["L1hits"]
},
{
"description": "Derived event showing the LL hits (--cache-sim=yes)",
"type": "string",
"enum": ["LLhits"]
},
{
"description": "Derived event showing the RAM hits (--cache-sim=yes)",
"type": "string",
"enum": ["RamHits"]
},
{
"description": "Derived event showing the total amount of cache reads and writes (--cache-sim=yes)",
"type": "string",
"enum": ["TotalRW"]
},
{
"description": "Derived event showing estimated CPU cycles (--cache-sim=yes)",
"type": "string",
"enum": ["EstimatedCycles"]
},
{
"description": "Conditional branches executed (--branch-sim=yes)",
"type": "string",
"enum": ["Bc"]
},
{
"description": "Conditional branches mispredicted (--branch-sim=yes)",
"type": "string",
"enum": ["Bcm"]
},
{
"description": "Indirect branches executed (--branch-sim=yes)",
"type": "string",
"enum": ["Bi"]
},
{
"description": "Indirect branches mispredicted (--branch-sim=yes)",
"type": "string",
"enum": ["Bim"]
},
{
"description": "Dirty miss because of instruction read (--simulate-wb=yes)",
"type": "string",
"enum": ["ILdmr"]
},
{
"description": "Dirty miss because of data read (--simulate-wb=yes)",
"type": "string",
"enum": ["DLdmr"]
},
{
"description": "Dirty miss because of data write (--simulate-wb=yes)",
"type": "string",
"enum": ["DLdmw"]
},
{
"description": "Counter showing bad temporal locality for L1 caches (--cachuse=yes)",
"type": "string",
"enum": ["AcCost1"]
},
{
"description": "Counter showing bad temporal locality for LL caches (--cachuse=yes)",
"type": "string",
"enum": ["AcCost2"]
},
{
"description": "Counter showing bad spatial locality for L1 caches (--cachuse=yes)",
"type": "string",
"enum": ["SpLoss1"]
},
{
"description": "Counter showing bad spatial locality for LL caches (--cachuse=yes)",
"type": "string",
"enum": ["SpLoss2"]
}
]
},
"FlamegraphSummary": {
"description": "The `FlamegraphSummary` records all created paths for an [`EventKind`] specific flamegraph\n\nEither the `regular_path`, `old_path` or the `diff_path` are present. Never can all of them be absent.",
"type": "object",
"required": ["event_kind"],
"properties": {
"base_path": {
"description": "If present, the path to the file of the old regular (non-differential) flamegraph",
"type": ["string", "null"]
},
"diff_path": {
"description": "If present, the path to the file of the differential flamegraph",
"type": ["string", "null"]
},
"event_kind": {
"description": "The `EventKind` of the flamegraph",
"allOf": [
{
"$ref": "#/definitions/EventKind"
}
]
},
"regular_path": {
"description": "If present, the path to the file of the regular (non-differential) flamegraph",
"type": ["string", "null"]
}
}
},
"SummaryFormat": {
"description": "The format (json, ...) in which the summary file should be saved or printed",
"oneOf": [
{
"description": "The format in a space optimal json representation without newlines",
"type": "string",
"enum": ["Json"]
},
{
"description": "The format in pretty printed json",
"type": "string",
"enum": ["PrettyJson"]
}
]
},
"SummaryOutput": {
"description": "Manage the summary output file with this `SummaryOutput`",
"type": "object",
"required": ["format", "path"],
"properties": {
"format": {
"description": "The [`SummaryFormat`]",
"allOf": [
{
"$ref": "#/definitions/SummaryFormat"
}
]
},
"path": {
"description": "The path to the destination file of this summary",
"type": "string"
}
}
},
"ToolRunSummary": {
"description": "The `ToolRunSummary` which contains all information about a single tool run process\n\nThere's a separate process and therefore `ToolRunSummary` for the parent process and each child process if `--trace-children=yes` was passed as argument to the `Tool`.",
"type": "object",
"required": ["command", "log_path", "summary"],
"properties": {
"command": {
"description": "The executed command extracted from Valgrind output",
"type": "string"
},
"costs_summary": {
"description": "The tool specific cost summary extracted from Valgrind output",
"anyOf": [
{
"$ref": "#/definitions/CostsSummary_for_String"
},
{
"type": "null"
}
]
},
"details": {
"description": "More details from the logging output of the tool run",
"type": ["string", "null"]
},
"error_summary": {
"description": "The error summary string of tools that have an error summary like Memcheck, DRD, Helgrind\n\nThe error summary is extracted from the ERROR SUMMARY line in log files. For example `4 errors from 3 contexts (suppressed: 2 from 1)` results in `ErrorSummary {errors: 4, contexts: 3, supp_errors: 2, supp_contexts: 1}`",
"anyOf": [
{
"$ref": "#/definitions/ErrorSummary"
},
{
"type": "null"
}
]
},
"log_path": {
"description": "The path to the full logfile from the tool run",
"type": "string"
},
"old_parent_pid": {
"description": "The old parent pid of this process",
"type": ["integer", "null"],
"format": "int32"
},
"old_pid": {
"description": "The old pid of this process",
"type": ["integer", "null"],
"format": "int32"
},
"parent_pid": {
"description": "The parent pid of this process",
"type": ["integer", "null"],
"format": "int32"
},
"pid": {
"description": "The pid of this process",
"type": ["integer", "null"],
"format": "int32"
},
"summary": {
"description": "The tool specific summary extracted from Valgrind output",
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"ToolSummary": {
"description": "The `ToolSummary` containing all information about a valgrind tool run",
"type": "object",
"required": ["log_paths", "out_paths", "summaries", "tool"],
"properties": {
"log_paths": {
"description": "The paths to the `*.log` files. All tools produce at least one log file",
"type": "array",
"items": {
"type": "string"
}
},
"out_paths": {
"description": "The paths to the `*.out` files. Not all tools produce an output in addition to the log files",
"type": "array",
"items": {
"type": "string"
}
},
"summaries": {
"description": "All [`ToolRunSummary`]s",
"type": "array",
"items": {
"$ref": "#/definitions/ToolRunSummary"
}
},
"tool": {
"description": "The Valgrind tool like `DHAT`, `Memcheck` etc.",
"allOf": [
{
"$ref": "#/definitions/ValgrindTool"
}
]
}
}
},
"ValgrindTool": {
"type": "string",
"enum": [
"Callgrind",
"Memcheck",
"Helgrind",
"DRD",
"Massif",
"DHAT",
"BBV"
]
}
}
}