File: sample-hot-func-list.test

package info (click to toggle)
llvm-toolchain-13 1%3A13.0.1-6~deb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,418,812 kB
  • sloc: cpp: 5,290,827; ansic: 996,570; asm: 544,593; python: 188,212; objc: 72,027; lisp: 30,291; f90: 25,395; sh: 24,900; javascript: 9,780; pascal: 9,398; perl: 7,484; ml: 5,432; awk: 3,523; makefile: 2,892; xml: 953; cs: 573; fortran: 539
file content (22 lines) | stat: -rw-r--r-- 1,674 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
; RUN: llvm-profdata show --sample --hot-func-list %S/Inputs/sample-hot-func-list.proftext | FileCheck %s --match-full-lines --strict-whitespace

;      CHECK:8 out of 10 functions with profile (80.00%) are considered hot functions (max sample >= 470).
; CHECK-NEXT:355251 out of 356026 profile counts (99.78%) are from hot functions.
; CHECK-NEXT: Total sample (%)       Max sample        Entry sample    Function name
; CHECK-NEXT: 184019 (51.69%)        2300              534             main
; CHECK-NEXT: 97401 (27.36%)         10640             3035            Func3
; CHECK-NEXT: 20305 (5.70%)          1000              1000            _Z3bazi
; CHECK-NEXT: 20301 (5.70%)          1437              1437            _Z3bari
; CHECK-NEXT: 17043 (4.79%)          3105              1594            Func2
; CHECK-NEXT: 7711 (2.17%)           610               610             _Z3fooi
; CHECK-NEXT: 6948 (1.95%)           3507              470             Func5
; CHECK-NEXT: 1523 (0.43%)           563               169             Func1


; RUN: llvm-profdata show --sample --hot-func-list %S/Inputs/cs-sample.proftext | FileCheck %s --match-full-lines --strict-whitespace --check-prefix=CS

;      CS:2 out of 8 functions with profile (25.00%) are considered hot functions (max sample >= 23324).
; CS-NEXT:1968152 out of 1968919 profile counts (99.96%) are from hot functions.
; CS-NEXT: Total sample (%)       Max sample        Entry sample    Function name
; CS-NEXT: 1467299 (74.52%)       287884            11              main:3 @ _Z5funcAi:1 @ _Z8funcLeafi
; CS-NEXT: 500853 (25.44%)        74946             20              main:3.1 @ _Z5funcBi:1 @ _Z8funcLeafi