etm_ckpt.h revision 25351652d920ae27c5a56c199da581033ce763f6
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
*
* Header file of checkpointing ereports for persistence
*
*/
#ifndef _ETM_CKPT_H
#define _ETM_CKPT_H
#ifdef __cplusplus
extern "C" {
#endif
#define ETM_CKPT_VERSION 0x10
#define ETM_CKPT_ERPT_PREFIX "ev"
#define ETM_LINE_LEN 256
/*
* Format of a named buffer that stores an ereport.
*/
typedef struct etm_ckpt_erpt_buf {
/* nvlist packed erpt event */
/*
* Ereport id
* Each ereport, which is stored in a named buffer, is uniquely identified by
* fields in the ereport. The named buffer name is derived from this struct
* as following
* ev_${ena}_${hash{class)}_${tod[1]}_${primary}
*/
typedef struct etm_ckpt_erpt_id {
/*
* A circular list of ereport ids
*/
typedef struct etm_ckpt_id_list {
/* array of ids */
#define ETM_CKPT_IL_BUF "idlist"
#define ETM_CKPT_IL_MIN_SIZE 0x8
/*
* Checkpoint options
*/
#define ETM_CKPT_NOOP 0x0
#define ETM_CKPT_SAVE 0x1
#define ETM_CKPT_RESTORE 0x2
#ifdef __cplusplus
}
#endif
#endif /* _ETM_CKPT_H */