summaryrefslogtreecommitdiff
path: root/apps/codecs
diff options
context:
space:
mode:
authorBrandon Low <lostlogic@rockbox.org>2006-01-18 20:54:13 +0000
committerBrandon Low <lostlogic@rockbox.org>2006-01-18 20:54:13 +0000
commit05dccc355144dc717b3cb9ef0074a9ab38a520f4 (patch)
tree0a36425cf1321817480a82ed05564a2790e2fca9 /apps/codecs
parent1060e447f83128a78dfaa8d59ba0baa642d15a4d (diff)
downloadrockbox-05dccc355144dc717b3cb9ef0074a9ab38a520f4.zip
rockbox-05dccc355144dc717b3cb9ef0074a9ab38a520f4.tar.gz
rockbox-05dccc355144dc717b3cb9ef0074a9ab38a520f4.tar.bz2
rockbox-05dccc355144dc717b3cb9ef0074a9ab38a520f4.tar.xz
Profiling support, tools and documentation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8375 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs')
-rw-r--r--apps/codecs/Tremor/Makefile2
-rw-r--r--apps/codecs/dumb/Makefile2
-rw-r--r--apps/codecs/lib/codeclib.c11
-rw-r--r--apps/codecs/lib/codeclib.h6
-rw-r--r--apps/codecs/libFLAC/Makefile2
-rw-r--r--apps/codecs/liba52/Makefile2
-rw-r--r--apps/codecs/libffmpegFLAC/Makefile2
-rw-r--r--apps/codecs/libm4a/Makefile2
-rw-r--r--apps/codecs/libmad/Makefile2
-rw-r--r--apps/codecs/libmusepack/Makefile2
-rw-r--r--apps/codecs/libwavpack/Makefile2
11 files changed, 26 insertions, 9 deletions
diff --git a/apps/codecs/Tremor/Makefile b/apps/codecs/Tremor/Makefile
index 7fd5de8..cec9797 100644
--- a/apps/codecs/Tremor/Makefile
+++ b/apps/codecs/Tremor/Makefile
@@ -16,7 +16,7 @@ endif
TREMOROPTS = -O2
CFLAGS = $(GCCOPTS) $(TREMOROPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \
- -DMEM=${MEMORYSIZE}
+ -DMEM=${MEMORYSIZE} ${PROFILE_OPTS}
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
diff --git a/apps/codecs/dumb/Makefile b/apps/codecs/dumb/Makefile
index fa647f3..d2a0452 100644
--- a/apps/codecs/dumb/Makefile
+++ b/apps/codecs/dumb/Makefile
@@ -178,7 +178,7 @@ WFLAGS_ALLEGRO := -Wno-missing-declarations
OFLAGS := -O2 -ffast-math -fomit-frame-pointer
DBGFLAGS := -DDEBUGMODE=1 -g3
-CFLAGS_RELEASE := -Iinclude $(WFLAGS) $(OFLAGS)
+CFLAGS_RELEASE := -Iinclude $(WFLAGS) $(OFLAGS) $(PROFILE_OPTS)
CFLAGS_DEBUG := -Iinclude $(WFLAGS) $(DBGFLAGS)
LDFLAGS := -s
diff --git a/apps/codecs/lib/codeclib.c b/apps/codecs/lib/codeclib.c
index cad8f53..1f070e8 100644
--- a/apps/codecs/lib/codeclib.c
+++ b/apps/codecs/lib/codeclib.c
@@ -149,3 +149,14 @@ void qsort(void *base, size_t nmemb, size_t size,
{
local_rb->qsort(base,nmemb,size,compar);
}
+
+#ifdef RB_PROFILE
+void __cyg_profile_func_enter(void *this_fn, void *call_site) {
+ (void)call_site;
+ local_rb->profile_func_enter(this_fn, __builtin_return_address(1));
+}
+
+void __cyg_profile_func_exit(void *this_fn, void *call_site) {
+ local_rb->profile_func_exit(this_fn,call_site);
+}
+#endif
diff --git a/apps/codecs/lib/codeclib.h b/apps/codecs/lib/codeclib.h
index e112112..c2e7869 100644
--- a/apps/codecs/lib/codeclib.h
+++ b/apps/codecs/lib/codeclib.h
@@ -58,3 +58,9 @@ void qsort(void *base, size_t nmemb, size_t size, int(*compar)(const void *, con
int codec_init(struct codec_api* rb);
void codec_set_replaygain(struct mp3entry* id3);
+#ifdef RB_PROFILE
+void __cyg_profile_func_enter(void *this_fn, void *call_site)
+ NO_PROF_ATTR ICODE_ATTR;
+void __cyg_profile_func_exit(void *this_fn, void *call_site)
+ NO_PROF_ATTR ICODE_ATTR;
+#endif
diff --git a/apps/codecs/libFLAC/Makefile b/apps/codecs/libFLAC/Makefile
index 4008479..d1e78bd 100644
--- a/apps/codecs/libFLAC/Makefile
+++ b/apps/codecs/libFLAC/Makefile
@@ -27,7 +27,7 @@ ifeq ($(NEWGCC), 1)
FLACOPTS += --param large-function-insns=10000
endif
-CFLAGS = $(GCCOPTS) $(FLACOPTS)\
+CFLAGS = $(GCCOPTS) $(PROFILE_OPTS) $(FLACOPTS)\
$(INCLUDES) $(TARGET) $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE}
# This sets up 'SRC' based on the files mentioned in SOURCES
diff --git a/apps/codecs/liba52/Makefile b/apps/codecs/liba52/Makefile
index 8e05017..ea3c01c 100644
--- a/apps/codecs/liba52/Makefile
+++ b/apps/codecs/liba52/Makefile
@@ -16,7 +16,7 @@ endif
A52OPTS = -O2
CFLAGS = $(GCCOPTS) $(A52OPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \
- -DMEM=${MEMORYSIZE}
+ -DMEM=${MEMORYSIZE} $(PROFILE_OPTS)
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
diff --git a/apps/codecs/libffmpegFLAC/Makefile b/apps/codecs/libffmpegFLAC/Makefile
index 60da5ae..7d9030e 100644
--- a/apps/codecs/libffmpegFLAC/Makefile
+++ b/apps/codecs/libffmpegFLAC/Makefile
@@ -16,7 +16,7 @@ endif
FLACOPTS = -O2
CFLAGS = $(GCCOPTS) $(FLACOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \
- -DMEM=${MEMORYSIZE}
+ -DMEM=${MEMORYSIZE} $(PROFILE_OPTS)
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
diff --git a/apps/codecs/libm4a/Makefile b/apps/codecs/libm4a/Makefile
index 7f870c9..fcbc100 100644
--- a/apps/codecs/libm4a/Makefile
+++ b/apps/codecs/libm4a/Makefile
@@ -16,7 +16,7 @@ endif
M4AOPTS = -O3
CFLAGS = $(GCCOPTS) $(M4AOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \
- -DMEM=${MEMORYSIZE}
+ -DMEM=${MEMORYSIZE} $(PROFILE_OPTS)
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
diff --git a/apps/codecs/libmad/Makefile b/apps/codecs/libmad/Makefile
index e2f2643..5eaf9f1 100644
--- a/apps/codecs/libmad/Makefile
+++ b/apps/codecs/libmad/Makefile
@@ -17,7 +17,7 @@ endif
# NOTE: FPM_ define has been moved to global.h
MADOPTS = -DNDEBUG -O2
CFLAGS = $(GCCOPTS) $(MADOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \
- -DMEM=${MEMORYSIZE}
+ -DMEM=${MEMORYSIZE} $(PROFILE_OPTS)
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
diff --git a/apps/codecs/libmusepack/Makefile b/apps/codecs/libmusepack/Makefile
index 8e65915..6bfa2f9 100644
--- a/apps/codecs/libmusepack/Makefile
+++ b/apps/codecs/libmusepack/Makefile
@@ -16,7 +16,7 @@ endif
MUSEPACKOPTS = -O2
CFLAGS = $(GCCOPTS) $(MUSEPACKOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \
- -DMEM=${MEMORYSIZE}
+ -DMEM=${MEMORYSIZE} $(PROFILE_OPTS)
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
diff --git a/apps/codecs/libwavpack/Makefile b/apps/codecs/libwavpack/Makefile
index 3947879..eba67fa 100644
--- a/apps/codecs/libwavpack/Makefile
+++ b/apps/codecs/libwavpack/Makefile
@@ -16,7 +16,7 @@ endif
WAVPACKOPTS = -O2
CFLAGS = $(GCCOPTS) $(WAVPACKOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \
- -DMEM=${MEMORYSIZE}
+ -DMEM=${MEMORYSIZE} $(PROFILE_OPTS)
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc