SUPDrv-dtrace.cpp revision a5af4f8add719046631d3d68734b9b6d9ca9d046
/* $Id$ */
/** @file
* VBoxDrv - The VirtualBox Support Driver - DTrace Provider.
*/
/*
* Copyright (C) 2012 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* The contents of this file may alternatively be used under the terms
* of the Common Development and Distribution License Version 1.0
* (CDDL) only, as it comes in the "COPYING.CDDL" file of the
* VirtualBox OSE distribution, in which case the provisions of the
* CDDL are applicable instead of those of the GPL.
*
* You may elect to license modified versions of this file under the
* terms and conditions of either the GPL or the CDDL or both.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#define LOG_GROUP LOG_GROUP_SUP_DRV
#include "SUPDrvInternal.h"
/*******************************************************************************
* Internal Functions *
*******************************************************************************/
/*static uint64_t supdrvDTracePOps_GetArgVal(void *pvProv, dtrace_id_t idProbe, void *pvProbe,
int iArg, int cFrames);*/
/*******************************************************************************
* Global Variables *
*******************************************************************************/
/** The default provider attributes. */
static dtrace_pattr_t g_DefProvAttrs =
{ /* .dtat_name, .dtat_data, .dtat_class */
};
/**
* DTrace provider method table.
*/
static const dtrace_pops_t g_SupDrvDTraceProvOps =
{
/* .dtps_provide = */ NULL,
/* .dtps_provide_module = */ supdrvDTracePOps_ProvideModule,
/* .dtps_enable = */ supdrvDTracePOps_Enable,
/* .dtps_disable = */ supdrvDTracePOps_Disable,
/* .dtps_suspend = */ NULL,
/* .dtps_resume = */ NULL,
/* .dtps_getargdesc = */ supdrvDTracePOps_GetArgDesc,
/* .dtps_usermode = */ NULL,
/* .dtps_destroy = */ supdrvDTracePOps_Destroy
};
/**
* Early module initialization hook.
*
* @returns VBox status code.
* @param pDevExt The device extension structure.
*/
{
/*
* Register a provider for this module.
*/
return VINF_SUCCESS;
}
/**
* Late module termination hook.
*
* @returns VBox status code.
* @param pDevExt The device extension structure.
*/
{
/*
* Undo what we did in supdrvDTraceInit.
*/
return VINF_SUCCESS;
}
/**
* Module loading hook, called before calling into the module.
*
* @returns VBox status code.
* @param pDevExt The device extension structure.
*/
{
/*
* Check for DTrace probes in the module, register a new provider for them
* if found.
*/
return VINF_SUCCESS;
}
/**
* Module unloading hook, called after execution in the module
* have ceased.
*
* @returns VBox status code.
* @param pDevExt The device extension structure.
*/
{
/*
* Undo what we did in supdrvDTraceModuleLoading.
*/
return VINF_SUCCESS;
}
/**
* @callback_method_impl{dtrace_pops_t,dtps_provide_module}
*/
{
return;
}
/**
* @callback_method_impl{dtrace_pops_t,dtps_enable}
*/
{
return -1;
}
/**
* @callback_method_impl{dtrace_pops_t,dtps_disable}
*/
{
}
/**
* @callback_method_impl{dtrace_pops_t,dtps_getargdesc}
*/
{
}
#if 0
/**
* @callback_method_impl{dtrace_pops_t,dtps_getargval}
*/
{
return 0xbeef;
}
#endif
/**
* @callback_method_impl{dtrace_pops_t,dtps_destroy}
*/
{
}