lkml.org 
[lkml]   [2002]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Subject[RFC] vsyscall_A0 LD_PRELOAD implementation
From
Date
Here's an example use of the vsyscall via LD_PRELOAD.

Attached is an example library that can be LD_PRELOADED to alias glib's
gettimeofday function w/ the vsyscall implementation. I've also included
a quick performance test to give a rough idea of the savings this gives.

Example run on a SMP P4 box:

[jstultz@elm3b52 vsyscall_test]$ ./run.sh
Normal gettimeofday
gettimeofday ( 1391621us / 1000000runs ) = 1.391620us
vsyscall LD_PRELOAD gettimeofday
gettimeofday ( 286567us / 1000000runs ) = 0.286567us

So it looks like a pretty big win.

thanks
-john

[unhandled content-type:application/x-gzip]
\
 
 \ /
  Last update: 2005-03-22 13:30    [W:0.118 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site