njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 1 | |
| 2 | /*--------------------------------------------------------------------*/ |
nethercote | 137bc55 | 2003-11-14 17:47:54 +0000 | [diff] [blame] | 3 | /*--- Dummy profiling machinery -- overridden by tools when they ---*/ |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 4 | /*--- want profiling. ---*/ |
| 5 | /*--- vg_dummy_profile.c ---*/ |
| 6 | /*--------------------------------------------------------------------*/ |
| 7 | |
| 8 | /* |
njn | b9c427c | 2004-12-01 14:14:42 +0000 | [diff] [blame] | 9 | This file is part of Valgrind, a dynamic binary instrumentation |
| 10 | framework. |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 11 | |
njn | 5361242 | 2005-03-12 16:22:54 +0000 | [diff] [blame] | 12 | Copyright (C) 2000-2005 Julian Seward |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 13 | jseward@acm.org |
| 14 | |
| 15 | This program is free software; you can redistribute it and/or |
| 16 | modify it under the terms of the GNU General Public License as |
| 17 | published by the Free Software Foundation; either version 2 of the |
| 18 | License, or (at your option) any later version. |
| 19 | |
| 20 | This program is distributed in the hope that it will be useful, but |
| 21 | WITHOUT ANY WARRANTY; without even the implied warranty of |
| 22 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 23 | General Public License for more details. |
| 24 | |
| 25 | You should have received a copy of the GNU General Public License |
| 26 | along with this program; if not, write to the Free Software |
| 27 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
| 28 | 02111-1307, USA. |
| 29 | |
| 30 | The GNU General Public License is contained in the file COPYING. |
| 31 | */ |
| 32 | |
nethercote | f1e5e15 | 2004-09-01 23:58:16 +0000 | [diff] [blame] | 33 | #include "core.h" |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 34 | |
njn | 0c15c33 | 2003-03-07 11:13:42 +0000 | [diff] [blame] | 35 | static void vgp_die(void) |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 36 | { |
| 37 | VG_(printf)( |
| 38 | "\nProfiling error:\n" |
nethercote | 137bc55 | 2003-11-14 17:47:54 +0000 | [diff] [blame] | 39 | " The --profile=yes option was specified, but the tool\n" |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 40 | " wasn't built for profiling. #include \"vg_profile.c\"\n" |
nethercote | 137bc55 | 2003-11-14 17:47:54 +0000 | [diff] [blame] | 41 | " into the tool and rebuild to allow profiling.\n\n"); |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 42 | VG_(exit)(1); |
| 43 | } |
| 44 | |
njn | 31066fd | 2005-03-26 00:42:02 +0000 | [diff] [blame] | 45 | void VG_(register_profile_event) ( Int n, Char* name ) |
njn | 0c15c33 | 2003-03-07 11:13:42 +0000 | [diff] [blame] | 46 | { |
| 47 | } |
| 48 | |
njn | 31066fd | 2005-03-26 00:42:02 +0000 | [diff] [blame] | 49 | void VG_(init_profiling) ( void ) |
njn | 0c15c33 | 2003-03-07 11:13:42 +0000 | [diff] [blame] | 50 | { |
| 51 | vgp_die(); |
| 52 | } |
| 53 | |
njn | 31066fd | 2005-03-26 00:42:02 +0000 | [diff] [blame] | 54 | void VG_(done_profiling) ( void ) |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 55 | { |
njn | 9d28c95 | 2003-03-07 13:54:50 +0000 | [diff] [blame] | 56 | VG_(core_panic)("done_profiling(), but not compiled for profiling??"); |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 57 | } |
| 58 | |
njn | 31066fd | 2005-03-26 00:42:02 +0000 | [diff] [blame] | 59 | void VG_(pushcc) ( UInt cc ) |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 60 | { |
njn | 0c15c33 | 2003-03-07 11:13:42 +0000 | [diff] [blame] | 61 | vgp_die(); |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 62 | } |
| 63 | |
njn | 31066fd | 2005-03-26 00:42:02 +0000 | [diff] [blame] | 64 | void VG_(popcc) ( UInt cc ) |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 65 | { |
njn | 0c15c33 | 2003-03-07 11:13:42 +0000 | [diff] [blame] | 66 | vgp_die(); |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 67 | } |
| 68 | |
| 69 | /*--------------------------------------------------------------------*/ |
| 70 | /*--- end vg_dummy_profile.c ---*/ |
| 71 | /*--------------------------------------------------------------------*/ |