summaryrefslogtreecommitdiff
path: root/apps/settings.c
diff options
context:
space:
mode:
authorTorne Wuff <torne@wolfpuppy.org.uk>2010-04-01 16:27:21 +0000
committerTorne Wuff <torne@wolfpuppy.org.uk>2010-04-01 16:27:21 +0000
commit52e528e057d7fd8d55116edf40500e0c0b3b75e8 (patch)
tree651413bf0f31fc64baeef8b4063c697d5df07baa /apps/settings.c
parentf376fd2f4aa9b27f2a6299177b4cc3c014da01f3 (diff)
downloadrockbox-52e528e057d7fd8d55116edf40500e0c0b3b75e8.tar.gz
rockbox-52e528e057d7fd8d55116edf40500e0c0b3b75e8.zip
Boot charting support.
Select (B)ootchart in advanced options in configure, and logf will record timings for various stages of boot, for performance comparisons. Format logged is: BC:>function_name,123,80 where 123 is the line number, 80 is the number of ticks since boot. This can be loaded as CSV into a spreadsheet. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25426 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings.c')
-rw-r--r--apps/settings.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/apps/settings.c b/apps/settings.c
index 412bedc464..d5fd98e70a 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -70,6 +70,7 @@
70#include "skin_engine/skin_engine.h" 70#include "skin_engine/skin_engine.h"
71#include "viewport.h" 71#include "viewport.h"
72#include "statusbar-skinned.h" 72#include "statusbar-skinned.h"
73#include "bootchart.h"
73 74
74#if CONFIG_CODEC == MAS3507D 75#if CONFIG_CODEC == MAS3507D
75void dac_line_in(bool enable); 76void dac_line_in(bool enable);
@@ -745,6 +746,7 @@ void settings_apply(bool read_disk)
745{ 746{
746 747
747 char buf[64]; 748 char buf[64];
749 int rc;
748#if CONFIG_CODEC == SWCODEC 750#if CONFIG_CODEC == SWCODEC
749 int i; 751 int i;
750#endif 752#endif
@@ -841,7 +843,10 @@ void settings_apply(bool read_disk)
841 && global_settings.font_file[0] != '-') { 843 && global_settings.font_file[0] != '-') {
842 snprintf(buf, sizeof buf, FONT_DIR "/%s.fnt", 844 snprintf(buf, sizeof buf, FONT_DIR "/%s.fnt",
843 global_settings.font_file); 845 global_settings.font_file);
844 if (font_load(NULL, buf) < 0) 846 CHART2(">font_load ", global_settings.font_file);
847 rc = font_load(NULL, buf);
848 CHART2("<font_load ", global_settings.font_file);
849 if (rc < 0)
845 font_reset(NULL); 850 font_reset(NULL);
846 } 851 }
847 else 852 else
@@ -851,7 +856,10 @@ void settings_apply(bool read_disk)
851 && global_settings.remote_font_file[0] != '-') { 856 && global_settings.remote_font_file[0] != '-') {
852 snprintf(buf, sizeof buf, FONT_DIR "/%s.fnt", 857 snprintf(buf, sizeof buf, FONT_DIR "/%s.fnt",
853 global_settings.remote_font_file); 858 global_settings.remote_font_file);
854 if (font_load_remoteui(buf) < 0) 859 CHART2(">font_load_remoteui ", global_settings.remote_font_file);
860 rc = font_load_remoteui(buf);
861 CHART2("<font_load_remoteui ", global_settings.remote_font_file);
862 if (rc < 0)
855 font_load_remoteui(NULL); 863 font_load_remoteui(NULL);
856 } 864 }
857 else 865 else
@@ -860,7 +868,9 @@ void settings_apply(bool read_disk)
860 if ( global_settings.kbd_file[0]) { 868 if ( global_settings.kbd_file[0]) {
861 snprintf(buf, sizeof buf, ROCKBOX_DIR "/%s.kbd", 869 snprintf(buf, sizeof buf, ROCKBOX_DIR "/%s.kbd",
862 global_settings.kbd_file); 870 global_settings.kbd_file);
871 CHART(">load_kbd");
863 load_kbd(buf); 872 load_kbd(buf);
873 CHART("<load_kbd");
864 } 874 }
865 else 875 else
866 load_kbd(NULL); 876 load_kbd(NULL);
@@ -869,16 +879,26 @@ void settings_apply(bool read_disk)
869 if ( global_settings.lang_file[0]) { 879 if ( global_settings.lang_file[0]) {
870 snprintf(buf, sizeof buf, LANG_DIR "/%s.lng", 880 snprintf(buf, sizeof buf, LANG_DIR "/%s.lng",
871 global_settings.lang_file); 881 global_settings.lang_file);
882 CHART(">lang_core_load");
872 lang_core_load(buf); 883 lang_core_load(buf);
884 CHART("<lang_core_load");
885 CHART(">talk_init");
873 talk_init(); /* use voice of same language */ 886 talk_init(); /* use voice of same language */
887 CHART("<talk_init");
874 } 888 }
875 889
876 /* load the icon set */ 890 /* load the icon set */
891 CHART(">icons_init");
877 icons_init(); 892 icons_init();
893 CHART("<icons_init");
878 894
879#ifdef HAVE_LCD_COLOR 895#ifdef HAVE_LCD_COLOR
880 if (global_settings.colors_file[0]) 896 if (global_settings.colors_file[0])
897 {
898 CHART(">read_color_theme_file");
881 read_color_theme_file(); 899 read_color_theme_file();
900 CHART("<read_color_theme_file");
901 }
882#endif 902#endif
883 } 903 }
884#ifdef HAVE_LCD_COLOR 904#ifdef HAVE_LCD_COLOR
@@ -901,7 +921,9 @@ void settings_apply(bool read_disk)
901 lcd_scroll_delay(global_settings.scroll_delay); 921 lcd_scroll_delay(global_settings.scroll_delay);
902 922
903 923
924 CHART(">set_codepage");
904 set_codepage(global_settings.default_codepage); 925 set_codepage(global_settings.default_codepage);
926 CHART("<set_codepage");
905 927
906#if CONFIG_CODEC == SWCODEC 928#if CONFIG_CODEC == SWCODEC
907#ifdef HAVE_CROSSFADE 929#ifdef HAVE_CROSSFADE
@@ -966,7 +988,9 @@ void settings_apply(bool read_disk)
966#endif 988#endif
967#ifdef HAVE_LCD_BITMAP 989#ifdef HAVE_LCD_BITMAP
968 /* already called with THEME_STATUSBAR in settings_apply_skins() */ 990 /* already called with THEME_STATUSBAR in settings_apply_skins() */
991 CHART(">viewportmanager_theme_changed");
969 viewportmanager_theme_changed(THEME_UI_VIEWPORT|THEME_LANGUAGE|THEME_BUTTONBAR); 992 viewportmanager_theme_changed(THEME_UI_VIEWPORT|THEME_LANGUAGE|THEME_BUTTONBAR);
993 CHART("<viewportmanager_theme_changed");
970#endif 994#endif
971} 995}
972 996