blob: acc6399a18f9126b2f5491145e8f6068cff6b8e8 [file] [log] [blame]
Andrew Trick04317cc2011-01-29 01:09:53 +00001/*===-- Profiling.h - Profiling support library support routines ----------===*\
Reid Spencer8b2e1412006-11-17 03:32:33 +00002|*
3|* The LLVM Compiler Infrastructure
4|*
Andrew Trick04317cc2011-01-29 01:09:53 +00005|* This file is distributed under the University of Illinois Open Source
6|* License. See LICENSE.TXT for details.
Reid Spencer8b2e1412006-11-17 03:32:33 +00007|*
8|*===----------------------------------------------------------------------===*|
9|*
10|* This file defines functions shared by the various different profiling
11|* implementations.
12|*
13\*===----------------------------------------------------------------------===*/
14
15#ifndef PROFILING_H
16#define PROFILING_H
17
Manman Rencd62c282012-08-24 18:31:44 +000018#include "llvm/Analysis/ProfileDataTypes.h" /* for enum ProfilingType */
Reid Spencer8b2e1412006-11-17 03:32:33 +000019
20/* save_arguments - Save argc and argv as passed into the program for the file
21 * we output.
22 */
23int save_arguments(int argc, const char **argv);
24
Andrew Trick04317cc2011-01-29 01:09:53 +000025/*
26 * Retrieves the file descriptor for the profile file.
27 */
28int getOutFile();
29
Reid Spencer8b2e1412006-11-17 03:32:33 +000030/* write_profiling_data - Write out a typed packet of profiling data to the
31 * current output file.
32 */
33void write_profiling_data(enum ProfilingType PT, unsigned *Start,
34 unsigned NumElements);
35
36#endif