LLVM API Documentation
00001 /*===-- ProfileInfoTypes.h - Profiling info shared constants --------------===*\ 00002 |* 00003 |* The LLVM Compiler Infrastructure 00004 |* 00005 |* This file is distributed under the University of Illinois Open Source 00006 |* License. See LICENSE.TXT for details. 00007 |* 00008 |*===----------------------------------------------------------------------===*| 00009 |* 00010 |* This file defines constants shared by the various different profiling 00011 |* runtime libraries and the LLVM C++ profile info loader. It must be a 00012 |* C header because, at present, the profiling runtimes are written in C. 00013 |* 00014 \*===----------------------------------------------------------------------===*/ 00015 00016 #ifndef LLVM_ANALYSIS_PROFILEINFOTYPES_H 00017 #define LLVM_ANALYSIS_PROFILEINFOTYPES_H 00018 00019 /* Included by libprofile. */ 00020 #if defined(__cplusplus) 00021 extern "C" { 00022 #endif 00023 00024 /* IDs to distinguish between those path counters stored in hashses vs arrays */ 00025 enum ProfilingStorageType { 00026 ProfilingArray = 1, 00027 ProfilingHash = 2 00028 }; 00029 00030 #include "llvm/Analysis/ProfileDataTypes.h" 00031 00032 /* 00033 * The header for tables that map path numbers to path counters. 00034 */ 00035 typedef struct { 00036 unsigned fnNumber; /* function number for these counters */ 00037 unsigned numEntries; /* number of entries stored */ 00038 } PathProfileHeader; 00039 00040 /* 00041 * Describes an entry in a tagged table for path counters. 00042 */ 00043 typedef struct { 00044 unsigned pathNumber; 00045 unsigned pathCounter; 00046 } PathProfileTableEntry; 00047 00048 #if defined(__cplusplus) 00049 } 00050 #endif 00051 00052 #endif /* LLVM_ANALYSIS_PROFILEINFOTYPES_H */