forked from len0rd/rockbox
Fix profiling builds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11034 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
5dc08bbfb2
commit
13f3c5b2cb
2 changed files with 9 additions and 17 deletions
|
|
@ -43,16 +43,6 @@ static int enc_channels;
|
||||||
|
|
||||||
static long input_buffer[CHUNK_SIZE/2] IBSS_ATTR;
|
static long input_buffer[CHUNK_SIZE/2] IBSS_ATTR;
|
||||||
|
|
||||||
void *memset(void *s, int c, size_t n)
|
|
||||||
{
|
|
||||||
return(ci->memset(s,c,n));
|
|
||||||
}
|
|
||||||
|
|
||||||
void *memcpy(void *dest, const void *src, size_t n)
|
|
||||||
{
|
|
||||||
return(ci->memcpy(dest,src,n));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* update file header info callback function */
|
/* update file header info callback function */
|
||||||
void enc_set_header(void *head_buffer, /* ptr to the file header data */
|
void enc_set_header(void *head_buffer, /* ptr to the file header data */
|
||||||
int head_size, /* size of this header data */
|
int head_size, /* size of this header data */
|
||||||
|
|
@ -112,6 +102,8 @@ enum codec_status codec_start(struct codec_api* api)
|
||||||
bool cpu_boosted = true; /* start boosted */
|
bool cpu_boosted = true; /* start boosted */
|
||||||
|
|
||||||
ci = api; // copy to global api pointer
|
ci = api; // copy to global api pointer
|
||||||
|
|
||||||
|
codec_init(ci);
|
||||||
|
|
||||||
if(ci->enc_get_inputs == NULL ||
|
if(ci->enc_get_inputs == NULL ||
|
||||||
ci->enc_set_parameters == NULL ||
|
ci->enc_set_parameters == NULL ||
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,9 @@
|
||||||
#include "kernel.h"
|
#include "kernel.h"
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
|
#ifdef RB_PROFILE
|
||||||
|
#include <profile.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define DEADBEEF ((unsigned int)0xdeadbeef)
|
#define DEADBEEF ((unsigned int)0xdeadbeef)
|
||||||
/* Cast to the the machine int type, whose size could be < 4. */
|
/* Cast to the the machine int type, whose size could be < 4. */
|
||||||
|
|
@ -67,13 +70,6 @@ void switch_thread(bool save_context, struct thread_entry **blocked_list)
|
||||||
static inline void store_context(void* addr) __attribute__ ((always_inline));
|
static inline void store_context(void* addr) __attribute__ ((always_inline));
|
||||||
static inline void load_context(const void* addr) __attribute__ ((always_inline));
|
static inline void load_context(const void* addr) __attribute__ ((always_inline));
|
||||||
|
|
||||||
#ifdef RB_PROFILE
|
|
||||||
#include <profile.h>
|
|
||||||
void profile_thread(void) {
|
|
||||||
profstart(cores[CURRENT_CORE].current_thread);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CPU_ARM)
|
#if defined(CPU_ARM)
|
||||||
/*---------------------------------------------------------------------------
|
/*---------------------------------------------------------------------------
|
||||||
* Store non-volatile context.
|
* Store non-volatile context.
|
||||||
|
|
@ -372,6 +368,10 @@ static int get_threadnum(struct thread_entry *thread)
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void profile_thread(void) {
|
||||||
|
profstart(get_threadnum(cores[CURRENT_CORE].running));
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Compiler trick: Don't declare as static to prevent putting
|
/* Compiler trick: Don't declare as static to prevent putting
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue