1//===-- copyprof_reporting.h ----------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8///
9/// This file declares the reporting interface that is used to log unnecessary
10// copies identified during object destruction.
11///
12//===----------------------------------------------------------------------===//
13
14#ifndef COPYPROF_REPORTING_H_
15#define COPYPROF_REPORTING_H_
16
17#include "sanitizer_common/sanitizer_common.h"
18
19namespace __copyprof {
20
21// Prints a CopyProf report to stderr. `pc` and `bp` are the program counter
22// and frame pointer where the copy was destroyed, `obj_size` its flat size in
23// bytes, and `did_allocate` whether the copy allocated memory.
24void LogCopyProfReport(uptr pc, uptr bp, uptr obj_size, bool did_allocate);
25
26} // namespace __copyprof
27
28#endif // COPYPROF_REPORTING_H_
29