[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] [PATCH 2/4] embedded: Allow to disable the prefetch
From: |
Paolo Bonzini |
Subject: |
Re: [Help-smalltalk] [PATCH 2/4] embedded: Allow to disable the prefetching. |
Date: |
Sat, 11 May 2013 19:10:27 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 |
Il 05/05/2013 11:26, Holger Hans Peter Freyther ha scritto:
> Disabling the prefetching is a win on arm9 (arm926ejs, e.g. TI
> Davinci DM644x). This was benchmarked using the simple Bench.st
> benchmark.
Can you do this from md-config.h instead?
Paolo
> 2013-04-28 Holger Hans Peter Freyther <address@hidden>
>
> * libgst/gstpriv.h: Allow to disable the DO_PREFETCH.
> ---
> configure.ac | 9 +++++++++
> libgst/ChangeLog | 4 ++++
> libgst/gstpriv.h | 3 ++-
> 3 files changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/configure.ac b/configure.ac
> index fbf1ce9..e0cb5e6 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -655,6 +655,15 @@ if test "$enable_preemption" != no; then
> [Define to enable preemptive multitasking of Smalltalk processes])
> fi
>
> +AC_ARG_ENABLE(prefetch,
> +[ --disable-prefetch disable memory prefetch macros], ,
> +enable_prefetch=yes)
> +
> +if test "$enable_prefetch" != no; then
> + AC_DEFINE(ENABLE_PREFETCH, 1,
> + [Define to enable usage of __builtin_prefetch])
> +fi
> +
> GST_ARG_ENABLE_MODULES([Blox,TCP])
>
> dnl
> diff --git a/libgst/ChangeLog b/libgst/ChangeLog
> index 4abaa9a..f952307 100644
> --- a/libgst/ChangeLog
> +++ b/libgst/ChangeLog
> @@ -1,3 +1,7 @@
> +2013-04-28 Holger Hans Peter Freyther <address@hidden>
> +
> + * libgst/gstpriv.h: Allow to disable the DO_PREFETCH.
> +
> 2013-04-25 Holger Hans Peter Freyther <address@hidden>
>
> * libgst/md-config.h: Add cases for the ARM architecture.
> diff --git a/libgst/gstpriv.h b/libgst/gstpriv.h
> index 7127438..b3d100f 100644
> --- a/libgst/gstpriv.h
> +++ b/libgst/gstpriv.h
> @@ -175,7 +175,8 @@
> #define PREF_T2 8
> #define PREF_NTA 12
>
> -#if GNUC_PREREQ (3, 1)
> +/* the prefetch is a loss on on a ARM9 (TI Davinci), hack it out */
> +#if defined(ENABLE_PREFETCH) && GNUC_PREREQ (3, 1)
> #define DO_PREFETCH(x, distance, k) \
> __builtin_prefetch (((char *) (x)) \
> + (((k) & PREF_BACKWARDS ? -(distance) : (distance)) \
>
[Help-smalltalk] [PATCH 4/4] embedded: Allow to disable the profiling support in the interpreter, Holger Hans Peter Freyther, 2013/05/05
Re: [Help-smalltalk] [PATCH 1/4] embedded: Use more registers on ARM as there are plenty and reduce the alignment, Paolo Bonzini, 2013/05/11