Home | History | Annotate | Line # | Download | only in raidframe
rf_acctrace.h revision 1.3.20.3
      1  1.3.20.2  nathanw /*	$NetBSD: rf_acctrace.h,v 1.3.20.3 2002/12/11 06:38:30 thorpej Exp $	*/
      2       1.1    oster /*
      3       1.1    oster  * Copyright (c) 1995 Carnegie-Mellon University.
      4       1.1    oster  * All rights reserved.
      5       1.1    oster  *
      6       1.1    oster  * Author: Mark Holland
      7       1.1    oster  *
      8       1.1    oster  * Permission to use, copy, modify and distribute this software and
      9       1.1    oster  * its documentation is hereby granted, provided that both the copyright
     10       1.1    oster  * notice and this permission notice appear in all copies of the
     11       1.1    oster  * software, derivative works or modified versions, and any portions
     12       1.1    oster  * thereof, and that both notices appear in supporting documentation.
     13       1.1    oster  *
     14       1.1    oster  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
     15       1.1    oster  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
     16       1.1    oster  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
     17       1.1    oster  *
     18       1.1    oster  * Carnegie Mellon requests users of this software to return to
     19       1.1    oster  *
     20       1.1    oster  *  Software Distribution Coordinator  or  Software.Distribution (at) CS.CMU.EDU
     21       1.1    oster  *  School of Computer Science
     22       1.1    oster  *  Carnegie Mellon University
     23       1.1    oster  *  Pittsburgh PA 15213-3890
     24       1.1    oster  *
     25       1.1    oster  * any improvements or extensions that they make and grant Carnegie the
     26       1.1    oster  * rights to redistribute these changes.
     27       1.1    oster  */
     28       1.1    oster 
     29       1.1    oster /*****************************************************************************
     30       1.3    oster  *
     31       1.1    oster  * acctrace.h -- header file for acctrace.c
     32       1.1    oster  *
     33       1.1    oster  *****************************************************************************/
     34       1.1    oster 
     35       1.1    oster 
     36       1.1    oster #ifndef _RF__RF_ACCTRACE_H_
     37       1.1    oster #define _RF__RF_ACCTRACE_H_
     38       1.1    oster 
     39  1.3.20.1  nathanw #include <dev/raidframe/raidframevar.h>
     40       1.1    oster #include "rf_hist.h"
     41       1.1    oster #include "rf_etimer.h"
     42       1.1    oster 
     43       1.1    oster typedef struct RF_user_acc_stats_s {
     44       1.3    oster 	RF_uint64 suspend_ovhd_us;	/* us spent mucking in the
     45       1.3    oster 					 * access-suspension code */
     46       1.3    oster 	RF_uint64 map_us;	/* us spent mapping the access */
     47       1.3    oster 	RF_uint64 lock_us;	/* us spent locking & unlocking stripes,
     48       1.3    oster 				 * including time spent blocked */
     49       1.3    oster 	RF_uint64 dag_create_us;/* us spent creating the DAGs */
     50       1.3    oster 	RF_uint64 dag_retry_us;	/* _total_ us spent retrying the op -- not
     51       1.3    oster 				 * broken down into components */
     52       1.3    oster 	RF_uint64 exec_us;	/* us spent in DispatchDAG */
     53       1.3    oster 	RF_uint64 exec_engine_us;	/* us spent in engine, not including
     54       1.3    oster 					 * blocking time */
     55       1.3    oster 	RF_uint64 cleanup_us;	/* us spent tearing down the dag & maps, and
     56       1.3    oster 				 * generally cleaning up */
     57       1.3    oster }       RF_user_acc_stats_t;
     58       1.1    oster 
     59       1.1    oster typedef struct RF_recon_acc_stats_s {
     60       1.3    oster 	RF_uint32 recon_start_to_fetch_us;
     61       1.3    oster 	RF_uint32 recon_fetch_to_return_us;
     62       1.3    oster 	RF_uint32 recon_return_to_submit_us;
     63       1.3    oster }       RF_recon_acc_stats_t;
     64       1.1    oster 
     65       1.1    oster typedef struct RF_acctrace_entry_s {
     66       1.3    oster 	union {
     67       1.3    oster 		RF_user_acc_stats_t user;
     68       1.3    oster 		RF_recon_acc_stats_t recon;
     69       1.3    oster 	}       specific;
     70       1.3    oster 	RF_uint8 reconacc;	/* whether  this is a tracerec for a user acc
     71       1.3    oster 				 * or a recon acc */
     72       1.3    oster 	RF_uint64 xor_us;	/* us spent doing XORs */
     73       1.3    oster 	RF_uint64 q_us;		/* us spent doing XORs */
     74       1.3    oster 	RF_uint64 plog_us;	/* us spent waiting to stuff parity into log */
     75       1.3    oster 	RF_uint64 diskqueue_us;	/* _total_ us spent in disk queue(s), incl
     76       1.3    oster 				 * concurrent ops */
     77       1.3    oster 	RF_uint64 diskwait_us;	/* _total_ us spent waiting actually waiting
     78       1.3    oster 				 * on the disk, incl concurrent ops */
     79       1.3    oster 	RF_uint64 total_us;	/* total us spent on this access */
     80       1.3    oster 	RF_uint64 num_phys_ios;	/* number of physical I/Os invoked */
     81       1.3    oster 	RF_uint64 phys_io_us;	/* time of physical I/O */
     82       1.3    oster 	RF_Etimer_t tot_timer;	/* a timer used to compute total access time */
     83       1.3    oster 	RF_Etimer_t timer;	/* a generic timer val for timing events that
     84       1.3    oster 				 * live across procedure boundaries */
     85       1.3    oster 	RF_Etimer_t recon_timer;/* generic timer for recon stuff */
     86       1.3    oster 	RF_uint64 index;
     87       1.3    oster }       RF_AccTraceEntry_t;
     88       1.1    oster 
     89       1.1    oster typedef struct RF_AccTotals_s {
     90       1.1    oster 	/* user acc stats */
     91       1.3    oster 	RF_uint64 suspend_ovhd_us;
     92       1.3    oster 	RF_uint64 map_us;
     93       1.3    oster 	RF_uint64 lock_us;
     94       1.3    oster 	RF_uint64 dag_create_us;
     95       1.3    oster 	RF_uint64 dag_retry_us;
     96       1.3    oster 	RF_uint64 exec_us;
     97       1.3    oster 	RF_uint64 exec_engine_us;
     98       1.3    oster 	RF_uint64 cleanup_us;
     99       1.3    oster 	RF_uint64 user_reccount;
    100       1.1    oster 	/* recon acc stats */
    101       1.3    oster 	RF_uint64 recon_start_to_fetch_us;
    102       1.3    oster 	RF_uint64 recon_fetch_to_return_us;
    103       1.3    oster 	RF_uint64 recon_return_to_submit_us;
    104       1.3    oster 	RF_uint64 recon_io_overflow_count;
    105       1.3    oster 	RF_uint64 recon_phys_io_us;
    106       1.3    oster 	RF_uint64 recon_num_phys_ios;
    107       1.3    oster 	RF_uint64 recon_diskwait_us;
    108       1.3    oster 	RF_uint64 recon_reccount;
    109       1.1    oster 	/* trace entry stats */
    110       1.3    oster 	RF_uint64 xor_us;
    111       1.3    oster 	RF_uint64 q_us;
    112       1.3    oster 	RF_uint64 plog_us;
    113       1.3    oster 	RF_uint64 diskqueue_us;
    114       1.3    oster 	RF_uint64 diskwait_us;
    115       1.3    oster 	RF_uint64 total_us;
    116       1.3    oster 	RF_uint64 num_log_ents;
    117       1.3    oster 	RF_uint64 phys_io_overflow_count;
    118       1.3    oster 	RF_uint64 num_phys_ios;
    119       1.3    oster 	RF_uint64 phys_io_us;
    120       1.3    oster 	RF_uint64 bigvals;
    121       1.1    oster 	/* histograms */
    122       1.1    oster 	RF_Hist_t dw_hist[RF_HIST_NUM_BUCKETS];
    123       1.1    oster 	RF_Hist_t tot_hist[RF_HIST_NUM_BUCKETS];
    124       1.3    oster }       RF_AccTotals_t;
    125  1.3.20.3  thorpej 
    126       1.1    oster RF_DECLARE_EXTERN_MUTEX(rf_tracing_mutex)
    127  1.3.20.3  thorpej 
    128       1.1    oster 
    129       1.3    oster 	int     rf_ConfigureAccessTrace(RF_ShutdownList_t ** listp);
    130       1.3    oster 	void    rf_LogTraceRec(RF_Raid_t * raid, RF_AccTraceEntry_t * rec);
    131       1.1    oster 
    132       1.3    oster #endif				/* !_RF__RF_ACCTRACE_H_ */
    133