head 1.2; access; symbols netbsd-7-2-RELEASE:1.1.1.3 netbsd-7-1-2-RELEASE:1.1.1.3 netbsd-7-1-1-RELEASE:1.1.1.3 netbsd-7-1:1.1.1.3.0.14 netbsd-7-1-RELEASE:1.1.1.3 netbsd-7-1-RC2:1.1.1.3 netbsd-7-1-RC1:1.1.1.3 netbsd-7-0-2-RELEASE:1.1.1.3 netbsd-7-0-1-RELEASE:1.1.1.3 netbsd-7-0:1.1.1.3.0.12 netbsd-7-0-RELEASE:1.1.1.3 netbsd-7-0-RC3:1.1.1.3 netbsd-7-0-RC2:1.1.1.3 netbsd-7-0-RC1:1.1.1.3 netbsd-5-2-3-RELEASE:1.1.1.1 netbsd-5-1-5-RELEASE:1.1.1.1 netbsd-6-0-6-RELEASE:1.1.1.3 netbsd-6-1-5-RELEASE:1.1.1.3 netbsd-7:1.1.1.3.0.10 netbsd-7-base:1.1.1.3 netbsd-6-1-4-RELEASE:1.1.1.3 netbsd-6-0-5-RELEASE:1.1.1.3 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.3 riastradh-drm2:1.1.1.3.0.8 riastradh-drm2-base:1.1.1.3 netbsd-6-1-3-RELEASE:1.1.1.3 netbsd-6-0-4-RELEASE:1.1.1.3 netbsd-5-2-2-RELEASE:1.1.1.1 netbsd-5-1-4-RELEASE:1.1.1.1 netbsd-6-1-2-RELEASE:1.1.1.3 netbsd-6-0-3-RELEASE:1.1.1.3 netbsd-5-2-1-RELEASE:1.1.1.1 netbsd-5-1-3-RELEASE:1.1.1.1 netbsd-6-1-1-RELEASE:1.1.1.3 xorg-server-1-10-6:1.1.1.3 netbsd-6-1:1.1.1.3.0.6 netbsd-6-0-2-RELEASE:1.1.1.3 netbsd-6-1-RELEASE:1.1.1.3 netbsd-6-1-RC4:1.1.1.3 netbsd-6-1-RC3:1.1.1.3 netbsd-6-1-RC2:1.1.1.3 netbsd-6-1-RC1:1.1.1.3 netbsd-5-2:1.1.1.1.0.8 netbsd-6-0-1-RELEASE:1.1.1.3 netbsd-5-2-RELEASE:1.1.1.1 netbsd-5-2-RC1:1.1.1.1 netbsd-6-0:1.1.1.3.0.4 netbsd-6-0-RELEASE:1.1.1.3 netbsd-6-0-RC2:1.1.1.3 netbsd-6-0-RC1:1.1.1.3 netbsd-6:1.1.1.3.0.2 netbsd-6-base:1.1.1.3 netbsd-5-1-2-RELEASE:1.1.1.1 netbsd-5-1-1-RELEASE:1.1.1.1 xorg-server-1-10-3:1.1.1.3 mrg-xorg-server-1-9-5-pre-1-10-3:1.1.1.2 xorg-server-1-9-5:1.1.1.2 xorg-server-1-9-2:1.1.1.2 netbsd-5-1:1.1.1.1.0.6 netbsd-5-1-RELEASE:1.1.1.1 netbsd-5-1-RC4:1.1.1.1 netbsd-5-1-RC3:1.1.1.1 netbsd-5-1-RC2:1.1.1.1 netbsd-5-1-RC1:1.1.1.1 netbsd-5-0-2-RELEASE:1.1.1.1 xorg-server-1-6-5:1.1.1.1 xorg-server-1-6-3:1.1.1.1 netbsd-5-0-1-RELEASE:1.1.1.1 xorg-server-1-6-2:1.1.1.1 xorg-server-1-6-1-901:1.1.1.1 netbsd-5-0:1.1.1.1.0.4 netbsd-5-0-RELEASE:1.1.1.1 netbsd-5-0-RC4:1.1.1.1 netbsd-5-0-RC3:1.1.1.1 netbsd-5-0-RC2:1.1.1.1 netbsd-5-0-RC1:1.1.1.1 netbsd-5:1.1.1.1.0.2 netbsd-5-base:1.1.1.1 xorg-server-1-4-2:1.1.1.1 xorg:1.1.1; locks; strict; comment @# @; 1.2 date 2016.08.11.00.04.28; author mrg; state dead; branches; next 1.1; commitid FQxwnZNPy5ZgOOhz; 1.1 date 2008.07.31.19.50.31; author mrg; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2008.07.31.19.50.31; author mrg; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2010.11.23.05.21.21; author mrg; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 2011.08.02.06.56.51; author mrg; state Exp; branches; next ; desc @@ 1.2 log @first merge of netbsd changes. not tested yet. @ text @ File Index
Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

dmxstat.c File Reference

#include "dmx.h"
#include "dmxstat.h"
#include "dmxlog.h"
#include "Xos.h"

Data Structures

struct  _DMXStatAvg
struct  _DMXStatInfo

Typedefs

typedef _DMXStatAvg DMXStatAvg

Functions

void dmxStatActivate (const char *interval, const char *displays)
DMXStatInfodmxStatAlloc (void)
void dmxStatFree (DMXStatInfo *pt)
void dmxStatSync (DMXScreenInfo *dmxScreen, struct timeval *stop, struct timeval *start, unsigned long pending)
void dmxStatInit (void)

Variables

int dmxStatInterval

Detailed Description

The DMX server code is written to call dmxSync() whenever an XSync() might be necessary. However, since XSync() requires a two way communication with the other X server, eliminating unnecessary XSync() calls is a key performance optimization. Support for this optimization is provided in #dmxsync.c. This file provides routines that evaluate this optimization by counting the number of XSync() calls and monitoring their latency. This functionality can be turned on using the -stat command-line parameter.

Typedef Documentation

typedef struct _DMXStatAvg DMXStatAvg
 

Used to compute a running average of value.


Function Documentation

void dmxStatActivate const char *  interval,
const char *  displays
 

Turn on XSync statistic gathering and printing. Print every interval seconds, with lines for the first displays. If interval is NULL, 1 will be used. If displays is NULL, 0 will be used (meaning a line for every display will be printed). Note that this function takes string arguments because it will usually be called from ddxProcessArgument in #dmxinit.c.

DMXStatInfo* dmxStatAlloc void   ) 
 

Allocate a DMXStatInfo structure.

void dmxStatFree DMXStatInfo pt  ) 
 

Free the memory used by a DMXStatInfo structure.

void dmxStatInit void   ) 
 

Try to initialize the statistic gathering and printing routines. Initialization only takes place if dmxStatActivate has already been called. We don't need the same generation protection that we used in dmxSyncInit because our timer is always on a queue -- hence, server generation will always free it.

void dmxStatSync DMXScreenInfo dmxScreen,
struct timeval *  stop,
struct timeval *  start,
unsigned long  pending
 

Note that a XSync() was just done on dmxScreen with the start and stop times (from gettimeofday()) and the number of pending-but-not-yet-processed XSync requests. This routine is called from #dmxDoSync in #dmxsync.c


Variable Documentation

int dmxStatInterval
 

Only for dmxstat.c and dmxsync.c


Generated June 29, 2004 for Distributed Multihead X by doxygen 1.3.4. @ 1.1 log @Initial revision @ text @@ 1.1.1.1 log @initial import of xorg-server-1.4.2 @ text @@ 1.1.1.2 log @import xorg-server 1.9.2. important changes since 1.6.5 include: - built-in symbol visibility, default not export - fixes for various crashes - many fixes for XI2, EXA, dix, render, glx, xkb, EDID, randr, Xv, resource handling, Xext, vfb, xfree86 / vga and composite support. - fixes several memory leaks - many many documentation updates - record extension enabled - no longer looks for XF86Config files @ text @d9 10 a18 97

dmxstat.c File Reference

#include "dmx.h"
#include "dmxstat.h"
#include "dmxlog.h"
#include <X11/Xos.h>

Data Structures

struct  _DMXStatAvg
struct  _DMXStatInfo

Typedefs

typedef struct _DMXStatAvg DMXStatAvg

Functions

static unsigned long usec (struct timeval *stop, struct timeval *start)
static unsigned long avg (DMXStatAvg *data, unsigned long *max)
void dmxStatActivate (const char *interval, const char *displays)
DMXStatInfodmxStatAlloc (void)
void dmxStatFree (DMXStatInfo *pt)
static void dmxStatValue (DMXStatAvg *data, unsigned long value)
void dmxStatSync (DMXScreenInfo *dmxScreen, struct timeval *stop, struct timeval *start, unsigned long pending)
static CARD32 dmxStatCallback (OsTimerPtr timer, CARD32 t, pointer arg)
void dmxStatInit (void)

Variables

int dmxStatInterval
static int dmxStatDisplays
static OsTimerPtr dmxStatTimer

Detailed Description

The DMX server code is written to call dmxSync() whenever an XSync() might be necessary. However, since XSync() requires a two way communication with the other X server, eliminating unnecessary XSync() calls is a key performance optimization. Support for this optimization is provided in dmxsync.c. This file provides routines that evaluate this optimization by counting the number of XSync() calls and monitoring their latency. This functionality can be turned on using the -stat command-line parameter.


Typedef Documentation

typedef struct _DMXStatAvg DMXStatAvg

Used to compute a running average of value.


Function Documentation

static unsigned long avg ( DMXStatAvg data,
unsigned long *  max 
) [static]
d20 1 a20 1

References _DMXStatAvg::count, and _DMXStatAvg::value.

d22 2 a23 1

Referenced by dmxStatCallback().

d25 2 a26 85
void dmxStatActivate ( const char *  interval,
const char *  displays 
)

Turn on XSync statistic gathering and printing. Print every interval seconds, with lines for the first displays. If interval is NULL, 1 will be used. If displays is NULL, 0 will be used (meaning a line for every display will be printed). Note that this function takes string arguments because it will usually be called from ddxProcessArgument in dmxinit.c.

References dmxStatDisplays, and dmxStatInterval.

Referenced by ddxProcessArgument().

DMXStatInfo* dmxStatAlloc ( void   ) 

Allocate a DMXStatInfo structure.

Referenced by dmxConfigAddDisplay().

static CARD32 dmxStatCallback ( OsTimerPtr  timer,
CARD32  t,
pointer  arg 
) [static]
void dmxStatFree ( DMXStatInfo pt  ) 

Free the memory used by a DMXStatInfo structure.

Referenced by InitOutput().

void dmxStatInit ( void   ) 

Try to initialize the statistic gathering and printing routines. Initialization only takes place if dmxStatActivate has already been called. We don't need the same generation protection that we used in dmxSyncInit because our timer is always on a queue -- hence, server generation will always free it.

d34 1 a34 1

References dmxStatCallback(), dmxStatInterval, and dmxStatTimer.

d36 2 a37 1

Referenced by InitOutput().

d39 8 a46 6
d48 22 a69 5 d71 4 a74 4 a76 1 a77 5 d79 2 a80 2 d84 2 a85 2 d87 1 d89 27 a115 3

Note that a XSync() was just done on dmxScreen with the start and stop times (from gettimeofday()) and the number of pending-but-not-yet-processed XSync requests. This routine is called from dmxDoSync in dmxsync.c

d117 28 a144 1

References _DMXStatInfo::bins, DMX_STAT_BIN0, DMX_STAT_BINS, dmxStatValue(), _DMXStatInfo::pending, _DMXScreenInfo::stat, _DMXStatInfo::syncCount, _DMXStatInfo::usec, and usec().

d146 28 a173 1

Referenced by dmxDoSync().

d175 20 a194 6
void dmxStatSync ( DMXScreenInfo dmxScreen,
struct timeval *  stop, struct timeval *  start,
unsigned long  pending )
d196 4 a199 4 a201 1 d203 3 a205 2 d209 3 a211 2 a212 14
static void dmxStatValue ( DMXStatAvg data, unsigned long  value ) [static]
a213 7 d215 3 a217 2 d221 2 a222 2 a223 20
static unsigned long usec ( struct timeval *  stop,
struct timeval *  start ) [static]

Return the number of microseconds as an unsigned long. Unfortunately, this is only useful for intervals < about 4 sec.

Referenced by dmxStatSync().


Variable Documentation

int dmxStatDisplays [static]
a224 11

Referenced by dmxStatActivate(), and dmxStatCallback().

d226 20 a245 12
int dmxStatInterval
d247 1 a247 2 d249 14 a262 8

Referenced by dmxStatInit().

@ 1.1.1.3 log @initial import of xorg-server 1.10.3. highlights include: - fixes xorg bugs 29969, 30367, 30527, 30267, 30260, 29046, 30260, 31548, 28672, 24887, 32115, 21457, 32436, 21827, 28414, 24703, 32803, 16318, 33449, 33324, 33929, 35082, 35209, 36146, 36119 - many additional NULL checks - adjustments related to input ABI 12 - *lots* of dead code removal - vga arbitrator fixes - GL fixes - EDID fixes - conversion to using asprintf() in many places - many fixes from valgrind, compiler warnings see these for more details: http://lists.freedesktop.org/archives/xorg-announce/2011-February/001612.html http://lists.freedesktop.org/archives/xorg-announce/2011-April/001646.html http://lists.freedesktop.org/archives/xorg-announce/2011-May/001675.html http://lists.freedesktop.org/archives/xorg-announce/2011-July/001710.html @ text @d9 3 a11 2
OsTimerPtr dmxStatTimer [static]
d42 2 a43 2 d46 1 a46 1 d49 9 a57 9 d60 3 a62 3 d64 3 a66 3

Detailed Description

The DMX server code is written to call dmxSync() whenever an XSync() might be necessary. However, since XSync() requires a two way communication with the other X server, eliminating unnecessary XSync() calls is a key performance optimization. Support for this optimization is provided in dmxsync.c. This file provides routines that evaluate this optimization by counting the number of XSync() calls and monitoring their latency. This functionality can be turned on using the -stat command-line parameter.


Typedef Documentation

d89 2 a90 2 d95 2 a96 2 d101 1 a101 1 d120 2 a121 2 d126 2 a127 2 d132 1 a132 1 d152 3 a154 2 d173 2 a174 2 d179 2 a180 2 d185 2 a186 2 d191 1 a191 1 d197 1 a197 1

References avg(), _DMXStatInfo::bins, DMX_STAT_BINS, DMX_STAT_INTERVAL, dmxDebug, dmxLog(), dmxLogCont(), dmxNumScreens, dmxScreens, dmxStatDisplays, dmxStatInterval, _DMXStatInfo::oldSyncCount, _DMXStatInfo::pending, _DMXScreenInfo::stat, _DMXStatInfo::syncCount, and _DMXStatInfo::usec.

d210 3 a212 2 d231 3 a233 2 d254 2 a255 2 d260 2 a261 2 d266 2 a267 2 d272 2 a273 2 d278 1 a278 1 d285 1 a285 1

References _DMXStatInfo::bins, DMX_STAT_BIN0, DMX_STAT_BINMULT, DMX_STAT_BINS, dmxStatValue(), _DMXStatInfo::pending, _DMXScreenInfo::stat, _DMXStatInfo::syncCount, _DMXStatInfo::usec, and usec().

d298 2 a299 2 d304 2 a305 2 d310 1 a310 1 d329 2 a330 2 d335 2 a336 2 d341 1 a341 1 a399 4
struct  _DMXStatAvg
struct  _DMXStatInfo
typedef struct _DMXStatAvg DMXStatAvg
static unsigned long usec (struct timeval *stop, struct timeval *start)
static unsigned long avg (DMXStatAvg *data, unsigned long *max)
void dmxStatActivate (const char *interval, const char *displays)
DMXStatInfodmxStatAlloc (void)
void dmxStatFree (DMXStatInfo *pt)
static void dmxStatValue (DMXStatAvg *data, unsigned long value)
void dmxStatSync (DMXScreenInfo *dmxScreen, struct timeval *stop, struct timeval *start, unsigned long pending)
static CARD32 dmxStatCallback (OsTimerPtr timer, CARD32 t, pointer arg)
void dmxStatInit (void)
int dmxStatInterval
static int dmxStatDisplays
static OsTimerPtr dmxStatTimer
DMXStatAvg data, unsigned long *  max  [static]const char *  interval, const char *  displays void  )OsTimerPtr  timer, CARD32  t, pointer  arg  [static]DMXStatInfo pt)void  )DMXScreenInfo dmxScreen, struct timeval *  stop, struct timeval *  start, unsigned long  pending DMXStatAvg data, unsigned long  value  [static]struct timeval *  stop, struct timeval *  start  [static]