1*e4b17023SJohn Marino /* Memory and optimization statistics helpers. 2*e4b17023SJohn Marino Copyright (C) 2004, 2007, 2008 3*e4b17023SJohn Marino Free Software Foundation, Inc. 4*e4b17023SJohn Marino Contributed by Cygnus Solutions. 5*e4b17023SJohn Marino 6*e4b17023SJohn Marino This file is part of GCC. 7*e4b17023SJohn Marino 8*e4b17023SJohn Marino GCC is free software; you can redistribute it and/or modify it 9*e4b17023SJohn Marino under the terms of the GNU General Public License as published by 10*e4b17023SJohn Marino the Free Software Foundation; either version 3, or (at your option) 11*e4b17023SJohn Marino any later version. 12*e4b17023SJohn Marino 13*e4b17023SJohn Marino GCC is distributed in the hope that it will be useful, but WITHOUT 14*e4b17023SJohn Marino ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 15*e4b17023SJohn Marino or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 16*e4b17023SJohn Marino License for more details. 17*e4b17023SJohn Marino 18*e4b17023SJohn Marino You should have received a copy of the GNU General Public License 19*e4b17023SJohn Marino along with GCC; see the file COPYING3. If not see 20*e4b17023SJohn Marino <http://www.gnu.org/licenses/>. */ 21*e4b17023SJohn Marino 22*e4b17023SJohn Marino #ifndef GCC_STATISTICS 23*e4b17023SJohn Marino #define GCC_STATISTICS 24*e4b17023SJohn Marino 25*e4b17023SJohn Marino #ifdef GATHER_STATISTICS 26*e4b17023SJohn Marino #define MEM_STAT_DECL , const char * ARG_UNUSED (_loc_name), int ARG_UNUSED (_loc_line), const char * ARG_UNUSED (_loc_function) 27*e4b17023SJohn Marino #define ALONE_MEM_STAT_DECL const char * ARG_UNUSED (_loc_name), int ARG_UNUSED (_loc_line), const char * ARG_UNUSED (_loc_function) 28*e4b17023SJohn Marino #define PASS_MEM_STAT , _loc_name, _loc_line, _loc_function 29*e4b17023SJohn Marino #define ALONE_PASS_MEM_STAT _loc_name, _loc_line, _loc_function 30*e4b17023SJohn Marino #define MEM_STAT_INFO , __FILE__, __LINE__, __FUNCTION__ 31*e4b17023SJohn Marino #define ALONE_MEM_STAT_INFO __FILE__, __LINE__, __FUNCTION__ 32*e4b17023SJohn Marino #else 33*e4b17023SJohn Marino #define MEM_STAT_DECL 34*e4b17023SJohn Marino #define ALONE_MEM_STAT_DECL void 35*e4b17023SJohn Marino #define PASS_MEM_STAT 36*e4b17023SJohn Marino #define ALONE_PASS_MEM_STAT 37*e4b17023SJohn Marino #define MEM_STAT_INFO 38*e4b17023SJohn Marino #define ALONE_MEM_STAT_INFO 39*e4b17023SJohn Marino #endif 40*e4b17023SJohn Marino 41*e4b17023SJohn Marino struct function; 42*e4b17023SJohn Marino 43*e4b17023SJohn Marino /* In statistics.c */ 44*e4b17023SJohn Marino extern void statistics_early_init (void); 45*e4b17023SJohn Marino extern void statistics_init (void); 46*e4b17023SJohn Marino extern void statistics_fini (void); 47*e4b17023SJohn Marino extern void statistics_fini_pass (void); 48*e4b17023SJohn Marino extern void statistics_counter_event (struct function *, const char *, int); 49*e4b17023SJohn Marino extern void statistics_histogram_event (struct function *, const char *, int); 50*e4b17023SJohn Marino 51*e4b17023SJohn Marino #endif 52