N800 and GCC options

I was a a bit surprised to hear that Nokia doesn’t compile the Maemo stuff with any ARMv6 specific GCC options. According to someone in IRC the gain is insignificant compared to increased size (and thus booting time) when not using thumb mode.

I decided to test this out and compiled a bunch of packages with -mcpu=arm1136j-s -mfpu=vfp -mfloat-abi=softfp GCC options and without -mthumb.

The performance tests included measuring rootfs booting time, gtk-perf, cairo-perf, encoding and decoding with theora and decoding with vorbis. Memory comsumption was not measured, even though it should have been. None of the tests were made with scientific accurance and there can be errors in the tests, although zuh double checked most of the tests. There aren’t much details here, but I should have them written down, so ask if you have any questions.


thumb

I took some of the gtk, hildon, glib, xlib, etc libraries and binaries that were compiled with -mthumb and compared the sizes. The sizes increased 23% in average, the minimum increase being 8% and the maximum 30%.

Booting time was calculated by measuring the time between setting the clock in /etc/init.d/rcS and running the last init.d script. This is not very accurate since processes are started to background etc. The booting time increased roughly 8% (2 seconds on my MMC).

Encoding with theora was a bit of a surprise. The encoding time with theora compiled with no GCC options and with –disable-float was even slightly faster than with floats and the mentioned ARMv6 GCC options. Decoding with theora seemed to be roughly 5% faster with the new options.

The biggest practical difference in this test came with vorbis decoding. Decoding with ARMv6 options took only 30% of the time when compared to no options.

Gtk-perf doesn’t cover many widgets but hopefully shows the direction of the performance differences. The improvement was around 14%.

Cairo-perf doesn’t give one nice number to for making hasty conclusions, but the improvements varied from 1.05x to 7x, while the average was 1.8x. cairo-perf-diff-files reported over 800 speedups and two slowdowns.

zuh writes about memory comsumption, thumb mode swithing, gtk-perf and cairo-perf in more detail in Movial‘s syslog.

For me the disk space isn’t an issue and I don’t boot the device so often that the two second delay in bootup really matters. So, for me the little speedups are welcome. I can even tolerate the memory loss reported by zuh.

Maemo Service Handler

It’s convenient for a Maemo developer to have sshd and syslogd running on the device but on normal use they just use resources and wear out the flash.

I made a little Control Panel plugin with zuh‘s help for starting and stopping System V style init script actions. It uses invoke-rc.d for starting and stopping services and update-rc.d to add and remove services in system boot time actions.

It has only basic features implemented, i.e. it can start and stop services and add and remove them from startup routines.

TODO:

  • Speed up starting time by getting rid of fork+exec
  • Add infoprints about the success of execution commands
  • Sort services alphabetically
  • Add option to hide “built-in” services

Maemo Service Handler CPA

Be aware that this includes a suid root binary for executing the System V scripts!

The plugin UI is written with C++ so you need to have extras repository on your catalogue list for gtkmm libraries:

Web address: http://repository.maemo.org/extras/
Distribution: bora
Components: free non-free

The plugin can be installed from my maemo repository:

Web address: http://tuomas.kulve.fi/debian
Distribution: bora
Components: maemo

Maemo screen grabber

Note! This is now in garage.

I made a simple wrapper for osso-screenshot-tool. It is started from the Others menu and after a 5 second delay it takes a screenshot and saves it to Images folder.

You can install it to your n800 from my maemo-repository:


Web address: http://tuomas.kulve.fi/debian
Distribution: bora
Components: maemo

Or with single click install.

Chinook

Updated for Chinook.


Web address: http://tuomas.kulve.fi/debian
Distribution: chinook
Components: maemo

Or with single click install.