Skip to content

[PGO] Reland PGO's Counter Reset and File Dumping APIs #76471 #78285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
15 changes: 4 additions & 11 deletions compiler-rt/test/profile/instrprof-api.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,10 @@
// RUN: %clang_profgen %s -S -emit-llvm -o - | FileCheck %s --check-prefix=PROFGEN
// RUN: %clang_pgogen %s -S -emit-llvm -o - | FileCheck %s --check-prefix=PROFGEN

// Testing profile use. Generate some profile file first.
// RUN: rm -rf rawprof.profraw
// RUN: %clang_profgen -o %t1 %s
// RUN: %run %t1
// RUN: llvm-profdata merge -o %t1.profdata rawprof.profraw
// RUN: %clang_profuse=%t1.profdata %s -S -emit-llvm -o - | FileCheck %s --check-prefix=PROFUSE
// RUN: rm -rf rawprof.profraw
// RUN: %clang_pgogen -o %t2 %s
// RUN: %run %t2
// RUN: llvm-profdata merge -o %t2.profdata rawprof.profraw
// RUN: %clang_pgouse=%t2.profdata %s -S -emit-llvm -o - | FileCheck %s --check-prefix=PROFUSE
// Testing profile use.
// RUN: %clang_pgouse=%S/Inputs/instrprof-api.c.profdata %s -S -emit-llvm -o - \
// RUN: | FileCheck %s --check-prefix=PROFUSE

#include "profile/instr_prof_interface.h"

__attribute__((noinline)) int bar() { return 4; }
Expand Down