1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
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
)
28 /* Clean up and write profile data */
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
)
36 /* Called when a thread starts, we check if it's our thread and resume timing */
37 void profile_thread_started(int current_thread
)
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*/