1 RUN: llvm-profdata show --sample --json %p/Inputs/sample-profile.proftext | FileCheck %s --check-prefix=JSON
2 RUN: llvm-profdata show --sample --show-format=json %p/Inputs/sample-profile.proftext | FileCheck %s --check-prefix=JSON
5 JSON-NEXT: "name": "main",
6 JSON-NEXT: "total": 184019,
11 JSON-NEXT: "samples": 534
15 JSON-NEXT: "discriminator": 2,
16 JSON-NEXT: "samples": 534
20 JSON-NEXT: "samples": 1075
24 JSON-NEXT: "discriminator": 1,
25 JSON-NEXT: "samples": 1075
29 JSON-NEXT: "samples": 2080
33 JSON-NEXT: "samples": 534
37 JSON-NEXT: "samples": 2064,
40 JSON-NEXT: "function": "_Z3bari",
41 JSON-NEXT: "samples": 1471
44 JSON-NEXT: "function": "_Z3fooi",
45 JSON-NEXT: "samples": 631
50 JSON-NEXT: "callsites": [
52 JSON-NEXT: "line": 10,
53 JSON-NEXT: "samples": [
55 JSON-NEXT: "name": "inline1",
56 JSON-NEXT: "total": 1000,
60 JSON-NEXT: "samples": 1000
67 JSON-NEXT: "line": 10,
68 JSON-NEXT: "samples": [
70 JSON-NEXT: "name": "inline2",
71 JSON-NEXT: "total": 2000,
75 JSON-NEXT: "samples": 2000
84 JSON-NEXT: "name": "_Z3bari",
85 JSON-NEXT: "total": 20301,
86 JSON-NEXT: "head": 1437,
90 JSON-NEXT: "samples": 1437
95 JSON-NEXT: "name": "_Z3fooi",
96 JSON-NEXT: "total": 7711,
97 JSON-NEXT: "head": 610,
100 JSON-NEXT: "line": 1,
101 JSON-NEXT: "samples": 610