Re: [dev] x86 osl/interlck.h performance

2006-05-12 Thread Ross Johnson

Jens-Heiner Rechtien wrote:


Hi,

I've done some additional very simple minded measurements to estimate 
the effects of inling the reference counters and the potential 
overhead for checking if we are on a SMP system. I got the following 
numbers:


I:  inlining
NOI:no-inlining
SMPC:   SMP check
NOSMPC: no SMP check

Times are in seconds.

NOI/NOSMPC, I/NOSMPC, NOI/SMPC, I/SMPC
P-IV 1800 (single)7.634   6.892 1.796   0.784
Xeon 3.06GHz (multi)  6.504.07  6.674.11

Conclusions: Checking for SMP costs about 1% (4.11s vs. 4.07s) 
additionally on multi-processor machines, and yields about 880% speed 
improvement on older non-HT/non-multiprocessor systems. Inlining is 
significant, too. The effect of inlining dwarfs the penalty for 
checking for SMP on modern multi-processor systems.


Great result for older machines, which is, I assume, where any 
improvement is needed most. I'm curious as to why the call overhead is 
such a large proportion of the Xeon result (37%). Were the total number 
of calls to incrementInterlockedCount() the same for both P-IV and Xeon? 
It looks as though the Xeon either doesn't lock the buss in this test, 
or it's a lot more efficient with it. I think you mentioned earlier that 
this was possible.


Ross



The measurements were done with the simple benchmark attached, they 
are of course no substitute for doing some real profiling with the 
office code.


Heiner



CFLAGS= -I. -fPIC -O2 -Wall -DINLINE -DCHECKSMP
#CFLAGS= -I. -fPIC -O2 -Wall -DINLINE
#CFLAGS= -I. -fPIC -O2 -Wall -DCHECKSMP
#CFLAGS= -I. -fPIC -O2 -Wall

intrlock: intrlock.o libsal.so
$(CC) $(CFLAGS) -o intrlock $< -L. -lsal

libsal.so: sal.o
$(CC) -shared -o libsal.so $<


clean:
rm *.o libsal.so intrlock

all: intrlock libsal.so

 




extern int is_smp;

#if defined(INLINE)
#if defined(CHECKSMP)
inline int incrementInterlockedCount(int *p) {
   int n;
   if ( is_smp ) {
   __asm__ __volatile__ (
   "movl $1, %0\n\t"
   "lock\n\t"
   "xaddl %0, %2\n\t"
   "incl %0" :
   "=&r" (n), "=m" (*p) :
   "m" (*p) :
   "memory");
   }
   else {
   __asm__ __volatile__ (
   "movl $1, %0\n\t"
   "xaddl %0, %2\n\t"
   "incl %0" :
   "=&r" (n), "=m" (*p) :
   "m" (*p) :
   "memory");
   }
   return n;
}
#else /* !CHECKSMP */
inline int incrementInterlockedCount(int *p) {
   int n;
   __asm__ __volatile__ (
   "movl $1, %0\n\t"
   "lock\n\t"
   "xaddl %0, %2\n\t"
   "incl %0" :
   "=&r" (n), "=m" (*p) :
   "m" (*p) :
   "memory");
   return n;
}
#endif /* !CHECKSMP */
#else  /* INLINE */
int incrementInterlockedCount(int *p);
#endif  /* INLINE */

 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] x86 osl/interlck.h performance

2006-05-12 Thread Jens-Heiner Rechtien

Hi,

I've done some additional very simple minded measurements to estimate 
the effects of inling the reference counters and the potential overhead 
for checking if we are on a SMP system. I got the following numbers:


I:  inlining
NOI:no-inlining
SMPC:   SMP check
NOSMPC: no SMP check

Times are in seconds.

NOI/NOSMPC, I/NOSMPC, NOI/SMPC, I/SMPC
P-IV 1800 (single)7.634   6.892 1.796   0.784
Xeon 3.06GHz (multi)  6.504.07  6.674.11

Conclusions: Checking for SMP costs about 1% (4.11s vs. 4.07s) 
additionally on multi-processor machines, and yields about 880% speed 
improvement on older non-HT/non-multiprocessor systems. Inlining is 
significant, too. The effect of inlining dwarfs the penalty for checking 
for SMP on modern multi-processor systems.


The measurements were done with the simple benchmark attached, they are 
of course no substitute for doing some real profiling with the office code.


Heiner

--
Jens-Heiner Rechtien
[EMAIL PROTECTED]
CFLAGS= -I. -fPIC -O2 -Wall -DINLINE -DCHECKSMP
#CFLAGS= -I. -fPIC -O2 -Wall -DINLINE
#CFLAGS= -I. -fPIC -O2 -Wall -DCHECKSMP
#CFLAGS= -I. -fPIC -O2 -Wall

intrlock: intrlock.o libsal.so
$(CC) $(CFLAGS) -o intrlock $< -L. -lsal

libsal.so: sal.o
$(CC) -shared -o libsal.so $<


clean:
rm *.o libsal.so intrlock

all: intrlock libsal.so

extern int is_smp;

#if defined(INLINE)
#if defined(CHECKSMP)
inline int incrementInterlockedCount(int *p) {
int n;
if ( is_smp ) {
__asm__ __volatile__ (
"movl $1, %0\n\t"
"lock\n\t"
"xaddl %0, %2\n\t"
"incl %0" :
"=&r" (n), "=m" (*p) :
"m" (*p) :
"memory");
}
else {
__asm__ __volatile__ (
"movl $1, %0\n\t"
"xaddl %0, %2\n\t"
"incl %0" :
"=&r" (n), "=m" (*p) :
"m" (*p) :
"memory");
}
return n;
}
#else /* !CHECKSMP */
inline int incrementInterlockedCount(int *p) {
int n;
__asm__ __volatile__ (
"movl $1, %0\n\t"
"lock\n\t"
"xaddl %0, %2\n\t"
"incl %0" :
"=&r" (n), "=m" (*p) :
"m" (*p) :
"memory");
return n;
}
#endif /* !CHECKSMP */
#else  /* INLINE */
int incrementInterlockedCount(int *p);
#endif  /* INLINE */

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: [dev] Re: open office drawings

2006-05-12 Thread Franco A. Bignone

Thanks very much !!

Franco

Tom Schindl wrote:


You need to learn the UNO-API
(http://api.openoffice.org/DevelopersGuide/DevelopersGuide.html) and if
you have questions don't hesitate to ask on [EMAIL PROTECTED]

Tom

Franco A. Bignone wrote:
 


Hello !

I am new to this list and I would like to ask a question. I have been
using the 'drawing' program for some time and I have found it,
aside from the lack of some capabilities, very powerful for large
and complex drawings. I would like to use it as an automatic
system to draw, so my question is  is there any possibility to
give the program a file with a list of instructions in order to
build a drawing ? How much is it difficult to change it in order
to do so ?

Regards

Franco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


   



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] Re: open office drawings

2006-05-12 Thread Tom Schindl
You need to learn the UNO-API
(http://api.openoffice.org/DevelopersGuide/DevelopersGuide.html) and if
you have questions don't hesitate to ask on [EMAIL PROTECTED]

Tom

Franco A. Bignone wrote:
> Hello !
> 
> I am new to this list and I would like to ask a question. I have been
> using the 'drawing' program for some time and I have found it,
> aside from the lack of some capabilities, very powerful for large
> and complex drawings. I would like to use it as an automatic
> system to draw, so my question is  is there any possibility to
> give the program a file with a list of instructions in order to
> build a drawing ? How much is it difficult to change it in order
> to do so ?
> 
> Regards
> 
> Franco
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



[dev] Changes to rtl/alloc and mt process termination

2006-05-12 Thread Stephan Bergmann

FYI:

I just stumbled over the fact that recent changes to rtl/alloc (see 
) 
further destabilize process termination, see 
.


The effects are that a process may fail very late (i.e., after main has 
been left/exit has been called, but while other threads are still 
running) due to rtl_allocateMemory returning NULL (leading to SEGV, or 
unexpected std::bad_alloc, etc., at least on Unix).


-Stephan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] Re: open office drawings

2006-05-12 Thread Michele Zarri

On 12/05/06, Franco A. Bignone <[EMAIL PROTECTED]> wrote:


Hello !

I am new to this list and I would like to ask a question. I have been
using the 'drawing' program for some time and I have found it,
aside from the lack of some capabilities, very powerful for large
and complex drawings. I would like to use it as an automatic
system to draw, so my question is  is there any possibility to
give the program a file with a list of instructions in order to
build a drawing ? How much is it difficult to change it in order
to do so ?

Regards

Franco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Hello Franco,


You can certainly program macros to automate your drawing, and there are
some quite impressive (at least for me) examples here:
http://www.ooomacros.org/user.php#91518

Finally, note that there is also an Italian list of users that you may
consider joining:
utenti@it.openoffice.org

Cheers,

Michele


[dev] Re: open office drawings

2006-05-12 Thread Franco A. Bignone

Hello !

I am new to this list and I would like to ask a question. I have been
using the 'drawing' program for some time and I have found it,
aside from the lack of some capabilities, very powerful for large
and complex drawings. I would like to use it as an automatic
system to draw, so my question is  is there any possibility to
give the program a file with a list of instructions in order to
build a drawing ? How much is it difficult to change it in order
to do so ?

Regards

Franco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]