Philips GoGear SA9200 port. Working bootloader and normal builds, including sound...
[Rockbox.git] / apps / plugins / lib / profile_plugin.c
blob6f31288c8f2629588e6e88c5454a75f6662d100e
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Passthrough routines for plugin profiling
12 * Copyright (C) 2006 Brandon Low
14 * All files in this archive are subject to the GNU General Public License.
15 * See the file COPYING in the source tree root for full license agreement.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #include "plugin.h"
24 static const struct plugin_api *local_rb = NULL; /* global api struct pointer */
26 void profile_init(const struct plugin_api* pa)
28 local_rb = pa;
31 void __cyg_profile_func_enter(void *this_fn, void *call_site) {
32 #ifdef CPU_COLDFIRE
33 (void)call_site;
34 local_rb->profile_func_enter(this_fn, __builtin_return_address(1));
35 #else
36 local_rb->profile_func_enter(this_fn, call_site);
37 #endif
40 void __cyg_profile_func_exit(void *this_fn, void *call_site) {
41 local_rb->profile_func_exit(this_fn,call_site);