When setting a cache path also enable the cache implicitly.
[Rockbox.git] / firmware / export / profile.h
blob4a7649e803c3d1428e136679dc2c1599c3d40d51
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Profiling routines counts ticks and calls to each profiled function.
12 * Copyright (C) 2005 by 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.
19 ****************************************************************************/
21 #ifndef _SYS_PROFILE_H
22 #define _SYS_PROFILE_H
24 /* Initialize and start profiling */
25 void profstart(int current_thread)
26 NO_PROF_ATTR;
28 /* Clean up and write profile data */
29 void profstop (void)
30 NO_PROF_ATTR;
32 /* Called every time a thread stops, we check if it's our thread and store
33 * temporary timing data if it is */
34 void profile_thread_stopped(int current_thread)
35 NO_PROF_ATTR;
36 /* Called when a thread starts, we check if it's our thread and resume timing */
37 void profile_thread_started(int current_thread)
38 NO_PROF_ATTR;
40 void profile_func_exit(void *this_fn, void *call_site)
41 NO_PROF_ATTR ICODE_ATTR;
42 void profile_func_enter(void *this_fn, void *call_site)
43 NO_PROF_ATTR ICODE_ATTR;
45 #endif /*_SYS_PROFILE_H*/