if_devar.h (121816) | if_devar.h (131575) |
---|---|
1/* $NetBSD: if_devar.h,v 1.32 1999/04/01 14:55:25 tsubai Exp $ */ 2 | 1/* $NetBSD: if_devar.h,v 1.32 1999/04/01 14:55:25 tsubai Exp $ */ 2 |
3/* $FreeBSD: head/sys/dev/de/if_devar.h 121816 2003-10-31 18:32:15Z brooks $ */ | 3/* $FreeBSD: head/sys/dev/de/if_devar.h 131575 2004-07-04 16:11:03Z stefanf $ */ |
4 5/*- 6 * Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com) 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions 11 * are met: --- 863 unchanged lines hidden (view full) --- 875 (sc)->tulip_perfstats[TULIP_PERF_CURRENT].member = 0; } while (0) 876#define TULIP_PERFSTART(name) const tulip_cycle_t perfstart_ ## name = TULIP_PERFREAD(); 877#define TULIP_PERFEND(name) do { \ 878 (sc)->tulip_curperfstats.perf_ ## name ## _cycles += TULIP_PERFDIFF(perfstart_ ## name, TULIP_PERFREAD()); \ 879 (sc)->tulip_curperfstats.perf_ ## name ++; \ 880 } while (0) 881#if defined(__i386__) 882typedef u_quad_t tulip_cycle_t; | 4 5/*- 6 * Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com) 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions 11 * are met: --- 863 unchanged lines hidden (view full) --- 875 (sc)->tulip_perfstats[TULIP_PERF_CURRENT].member = 0; } while (0) 876#define TULIP_PERFSTART(name) const tulip_cycle_t perfstart_ ## name = TULIP_PERFREAD(); 877#define TULIP_PERFEND(name) do { \ 878 (sc)->tulip_curperfstats.perf_ ## name ## _cycles += TULIP_PERFDIFF(perfstart_ ## name, TULIP_PERFREAD()); \ 879 (sc)->tulip_curperfstats.perf_ ## name ++; \ 880 } while (0) 881#if defined(__i386__) 882typedef u_quad_t tulip_cycle_t; |
883static __inline__ tulip_cycle_t | 883static __inline tulip_cycle_t |
884TULIP_PERFREAD( 885 void) 886{ 887 tulip_cycle_t x; 888 __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x)); 889 return x; 890} 891#define TULIP_PERFDIFF(s, f) ((f) - (s)) 892#elif defined(__alpha__) 893typedef unsigned long tulip_cycle_t; | 884TULIP_PERFREAD( 885 void) 886{ 887 tulip_cycle_t x; 888 __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x)); 889 return x; 890} 891#define TULIP_PERFDIFF(s, f) ((f) - (s)) 892#elif defined(__alpha__) 893typedef unsigned long tulip_cycle_t; |
894static __inline__ tulip_cycle_t | 894static __inline tulip_cycle_t |
895TULIP_PERFREAD( 896 void) 897{ 898 tulip_cycle_t x; 899 __asm__ volatile ("rpcc %0" : "=r" (x)); 900 return x; 901} 902#define TULIP_PERFDIFF(s, f) ((unsigned int) ((f) - (s))) --- 20 unchanged lines hidden --- | 895TULIP_PERFREAD( 896 void) 897{ 898 tulip_cycle_t x; 899 __asm__ volatile ("rpcc %0" : "=r" (x)); 900 return x; 901} 902#define TULIP_PERFDIFF(s, f) ((unsigned int) ((f) - (s))) --- 20 unchanged lines hidden --- |