VirtualBox

Changeset 75498 in vbox for trunk/src/VBox/HostServices


Ignore:
Timestamp:
Nov 16, 2018 12:03:41 AM (6 years ago)
Author:
vboxsync
Message:

HGCM,Main,SharedFolder,SharedClipboard,GuestProperties: Added HGCM service helpers for statistics and dbg info registration/deregistration. A PUVM is passed to HGCMService (where the helpers are implemented) when the service is loaded. Since this drags in both dbg.h and stam.h, LOG_GROUP defines now have to be at the top of the include list as everywhere else (i.e. hgcmsvc.h will define LOG_GROUP default by dragging in log.h). Added generic statistics of HGCM message processing and function level statistics to the shared folder service. [missing files, ++]

Location:
trunk/src/VBox/HostServices
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/GuestProperties/service.cpp

    r73511 r75498  
    394394    }
    395395
    396 #ifdef ASYNC_HOST_NOTIFY
    397396    int initialize();
    398 #endif
    399397
    400398private:
     
    422420    int hostCall(uint32_t eFunction, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
    423421    int uninit();
    424     void dbgInfoShow(PCDBGFINFOHLP pHlp);
    425422    static DECLCALLBACK(void) dbgInfo(void *pvUser, PCDBGFINFOHLP pHlp, const char *pszArgs);
    426423
     
    14391436static DECLCALLBACK(int) dbgInfoCallback(PRTSTRSPACECORE pStr, void *pvUser)
    14401437{
    1441     Property *pProp = (Property *)pStr;
    1442     PCDBGFINFOHLP pHlp = ((ENUMDBGINFO*)pvUser)->pHlp;
     1438    Property     *pProp = (Property *)pStr;
     1439    PCDBGFINFOHLP pHlp  = ((ENUMDBGINFO *)pvUser)->pHlp;
    14431440
    14441441    char szFlags[GUEST_PROP_MAX_FLAGS_LEN];
     
    14471444        RTStrPrintf(szFlags, sizeof(szFlags), "???");
    14481445
    1449     pHlp->pfnPrintf(pHlp, "%s: '%s', %RU64",
    1450                     pProp->mName.c_str(), pProp->mValue.c_str(), pProp->mTimestamp);
     1446    pHlp->pfnPrintf(pHlp, "%s: '%s', %RU64", pProp->mName.c_str(), pProp->mValue.c_str(), pProp->mTimestamp);
    14511447    if (strlen(szFlags))
    14521448        pHlp->pfnPrintf(pHlp, " (%s)", szFlags);
     
    14551451}
    14561452
    1457 void Service::dbgInfoShow(PCDBGFINFOHLP pHlp)
    1458 {
    1459     ENUMDBGINFO EnumData = { pHlp };
    1460     RTStrSpaceEnumerate(&mhProperties, dbgInfoCallback, &EnumData);
    1461 }
    14621453
    14631454/**
     
    14681459 * @param   pszArgs     Arguments, ignored.
    14691460 */
    1470 void Service::dbgInfo(void *pvUser, PCDBGFINFOHLP pHlp, const char *pszArgs)
     1461DECLCALLBACK(void) Service::dbgInfo(void *pvUser, PCDBGFINFOHLP pHlp, const char *pszArgs)
    14711462{
    14721463    RT_NOREF1(pszArgs);
    14731464    SELF *pSelf = reinterpret_cast<SELF *>(pvUser);
    1474     pSelf->dbgInfoShow(pHlp);
     1465
     1466    ENUMDBGINFO EnumData = { pHlp };
     1467    RTStrSpaceEnumerate(&pSelf->mhProperties, dbgInfoCallback, &EnumData);
    14751468}
    14761469
     
    15421535                break;
    15431536
    1544             case GUEST_PROP_FN_HOST_GET_DBGF_INFO:
    1545                 if (cParms != 2)
    1546                     return VERR_INVALID_PARAMETER;
    1547                 paParms[0].u.pointer.addr = (void*)(uintptr_t)dbgInfo;
    1548                 paParms[1].u.pointer.addr = (void*)this;
    1549                 break;
    1550 
    15511537            default:
    15521538                rc = VERR_NOT_SUPPORTED;
     
    15641550
    15651551#ifdef ASYNC_HOST_NOTIFY
     1552
    15661553/* static */
    15671554DECLCALLBACK(int) Service::threadNotifyHost(RTTHREAD hThreadSelf, void *pvUser)
     
    15961583}
    15971584
     1585#endif /* ASYNC_HOST_NOTIFY */
     1586
    15981587int Service::initialize()
    15991588{
     1589#ifdef ASYNC_HOST_NOTIFY
    16001590    /* The host notification thread and queue. */
    16011591    int rc = RTReqQueueCreate(&mhReqQNotifyHost);
     
    16191609        }
    16201610    }
     1611#else  /* !ASYNC_HOST_NOTIFY */
     1612    int rc = VINF_SUCCESS;
     1613#endif /* !ASYNC_HOST_NOTIFY */
     1614
     1615    /* Finally debug stuff (ignore failures): */
     1616    if (RT_SUCCESS(rc))
     1617        HGCMSvcHlpInfoRegister(mpHelpers, "guestprops", "Display the guest properties", Service::dbgInfo, this);
    16211618
    16221619    return rc;
    16231620}
    16241621
     1622#ifdef ASYNC_HOST_NOTIFY
    16251623/**
    16261624 * @callback_method_impl{FNRTSTRSPACECALLBACK, Destroys Property.}
     
    16381636int Service::uninit()
    16391637{
     1638    if (mpHelpers)
     1639        HGCMSvcHlpInfoDeregister(mpHelpers, "guestprops");
     1640
    16401641#ifdef ASYNC_HOST_NOTIFY
    16411642    if (mhReqQNotifyHost != NIL_RTREQQUEUE)
     
    16561657    }
    16571658#endif
    1658 
    16591659    return VINF_SUCCESS;
    16601660}
     
    16671667 * @copydoc VBOXHGCMSVCLOAD
    16681668 */
    1669 extern "C" DECLCALLBACK(DECLEXPORT(int)) VBoxHGCMSvcLoad (VBOXHGCMSVCFNTABLE *ptable)
     1669extern "C" DECLCALLBACK(DECLEXPORT(int)) VBoxHGCMSvcLoad(VBOXHGCMSVCFNTABLE *ptable)
    16701670{
    16711671    int rc = VERR_IPE_UNINITIALIZED_STATUS;
     
    17131713                ptable->pfnLoadState          = NULL;  /* construction done before restoring suffices */
    17141714                ptable->pfnRegisterExtension  = Service::svcRegisterExtension;
     1715                ptable->pvService             = pService;
    17151716
    17161717                /* Service specific initialization. */
    1717                 ptable->pvService = pService;
    1718 
    1719 #ifdef ASYNC_HOST_NOTIFY
    17201718                rc = pService->initialize();
    17211719                if (RT_FAILURE(rc))
     
    17241722                    pService = NULL;
    17251723                }
    1726 #endif
    17271724            }
    17281725            else
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxClipboard-win.cpp

    r69500 r75498  
     1/* $Id$ */
    12/** @file
    2  * Shared Clipboard: Win32 host.
     3 * Shared Clipboard Service - Win32 host.
    34 */
    45
     
    1516 */
    1617
     18
     19/*********************************************************************************************************************************
     20*   Header Files                                                                                                                 *
     21*********************************************************************************************************************************/
     22#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
    1723#include <iprt/win/windows.h>
    1824
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxClipboard.h

    r69500 r75498  
     1/* $Id$ */
    12/** @file
    2  *
    3  * Shared Clipboard
     3 * Shared Clipboard Service - Internal Header.
    44 */
    55
     
    1616 */
    1717
    18 #ifndef __VBOXCLIPBOARD__H
    19 #define __VBOXCLIPBOARD__H
     18#ifndef ___VBOXCLIPBOARD_H
     19#define ___VBOXCLIPBOARD_H
    2020
    21 #define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
    2221#include <VBox/hgcmsvc.h>
    2322#include <VBox/log.h>
     
    9897#endif
    9998
    100 #endif /* __VBOXCLIPBOARD__H */
     99#endif /* !___VBOXCLIPBOARD_H */
     100
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboard.rc

    r69500 r75498  
    11/* $Id$ */
    22/** @file
    3  * VBoxSharedClipboard - Resource file containing version info and icon.
     3 * Shared Clipboard Service - Resource file containing version info and icon.
    44 */
    55
  • trunk/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.cpp

    r69500 r75498  
    11/* $Id$ */
    22/** @file
    3  * Shared Clipboard: Mac OS X host implementation.
     3 * Shared Clipboard Service - Mac OS X host implementation.
    44 */
    55
     
    1818 */
    1919
    20 #define LOG_GROUP LOG_GROUP_HGCM
     20/*********************************************************************************************************************************
     21*   Header Files                                                                                                                 *
     22*********************************************************************************************************************************/
     23#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
    2124#include <Carbon/Carbon.h>
    2225
     
    2932#include "VBox/GuestHost/clipboard-helper.h"
    3033
     34
     35/*********************************************************************************************************************************
     36*   Defined Constants And Macros                                                                                                 *
     37*********************************************************************************************************************************/
    3138/* For debugging */
    3239//#define SHOW_CLIPBOARD_CONTENT
     40
    3341
    3442/**
  • trunk/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.h

    r69500 r75498  
    11/* $Id$ */
    22/** @file
    3  * Shared Clipboard: Mac OS X host implementation.
     3 * Shared Clipboard Service - Mac OS X host implementation.
    44 */
    55
     
    2121typedef struct OpaquePasteboardRef *PasteboardRef;
    2222
    23 int initPasteboard (PasteboardRef *pPasteboardRef);
    24 void destroyPasteboard (PasteboardRef *pPasteboardRef);
     23int initPasteboard(PasteboardRef *pPasteboardRef);
     24void destroyPasteboard(PasteboardRef *pPasteboardRef);
    2525
    26 int queryNewPasteboardFormats (PasteboardRef pPasteboard, uint32_t *pfFormats, bool *pfChanged);
    27 int readFromPasteboard (PasteboardRef pPasteboard, uint32_t fFormat, void *pv, uint32_t cb, uint32_t *pcbActual);
    28 int writeToPasteboard (PasteboardRef pPasteboard, void *pv, uint32_t cb, uint32_t fFormat);
     26int queryNewPasteboardFormats(PasteboardRef pPasteboard, uint32_t *pfFormats, bool *pfChanged);
     27int readFromPasteboard(PasteboardRef pPasteboard, uint32_t fFormat, void *pv, uint32_t cb, uint32_t *pcbActual);
     28int writeToPasteboard(PasteboardRef pPasteboard, void *pv, uint32_t cb, uint32_t fFormat);
    2929
    3030#endif
  • trunk/src/VBox/HostServices/SharedClipboard/darwin.cpp

    r69500 r75498  
    11/* $Id$ */
    22/** @file
    3  * Shared Clipboard: Mac OS X host.
     3 * Shared Clipboard Service - Mac OS X host.
    44 */
    55
     
    1616 */
    1717
     18
     19/*********************************************************************************************************************************
     20*   Header Files                                                                                                                 *
     21*********************************************************************************************************************************/
     22#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
    1823#include <VBox/HostServices/VBoxClipboardSvc.h>
    1924
     
    2530#include "darwin-pasteboard.h"
    2631
     32
     33/*********************************************************************************************************************************
     34*   Structures and Typedefs                                                                                                      *
     35*********************************************************************************************************************************/
    2736/** Global clipboard context information */
    2837struct _VBOXCLIPBOARDCONTEXT
     
    3847};
    3948
     49
     50/*********************************************************************************************************************************
     51*   Global Variables                                                                                                             *
     52*********************************************************************************************************************************/
    4053/** Only one client is supported. There seems to be no need for more clients. */
    4154static VBOXCLIPBOARDCONTEXT g_ctx;
  • trunk/src/VBox/HostServices/SharedClipboard/service.cpp

    r73097 r75498  
    11/* $Id$ */
    22/** @file
    3  * Shared Clipboard: Host service entry points.
     3 * Shared Clipboard Service - Host service entry points.
    44 */
    55
     
    7070 */
    7171
     72/*********************************************************************************************************************************
     73*   Header Files                                                                                                                 *
     74*********************************************************************************************************************************/
     75#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
    7276#include <VBox/HostServices/VBoxClipboardSvc.h>
    7377#include <VBox/HostServices/VBoxClipboardExt.h>
     
    8185#include "VBoxClipboard.h"
    8286
    83 static void VBoxHGCMParmUInt32Set (VBOXHGCMSVCPARM *pParm, uint32_t u32)
    84 {
    85     pParm->type = VBOX_HGCM_SVC_PARM_32BIT;
    86     pParm->u.uint32 = u32;
    87 }
    88 
    89 static int VBoxHGCMParmUInt32Get (VBOXHGCMSVCPARM *pParm, uint32_t *pu32)
    90 {
    91     if (pParm->type == VBOX_HGCM_SVC_PARM_32BIT)
    92     {
    93         *pu32 = pParm->u.uint32;
    94         return VINF_SUCCESS;
    95     }
    96 
    97     return VERR_INVALID_PARAMETER;
    98 }
    99 
    100 #if 0
    101 static void VBoxHGCMParmPtrSet (VBOXHGCMSVCPARM *pParm, void *pv, uint32_t cb)
    102 {
    103     pParm->type             = VBOX_HGCM_SVC_PARM_PTR;
    104     pParm->u.pointer.size   = cb;
    105     pParm->u.pointer.addr   = pv;
    106 }
    107 #endif
    108 
    109 static int VBoxHGCMParmPtrGet (VBOXHGCMSVCPARM *pParm, void **ppv, uint32_t *pcb)
    110 {
    111     if (pParm->type == VBOX_HGCM_SVC_PARM_PTR)
    112     {
    113         *ppv = pParm->u.pointer.addr;
    114         *pcb = pParm->u.pointer.size;
    115         return VINF_SUCCESS;
    116     }
    117 
    118     return VERR_INVALID_PARAMETER;
    119 }
    120 
     87
     88/*********************************************************************************************************************************
     89*   Global Variables                                                                                                             *
     90*********************************************************************************************************************************/
    12191static PVBOXHGCMSVCHELPERS g_pHelpers;
    12292
     
    136106/** Is the clipboard running in headless mode? */
    137107static bool g_fHeadless = false;
     108
     109
     110static void VBoxHGCMParmUInt32Set (VBOXHGCMSVCPARM *pParm, uint32_t u32)
     111{
     112    pParm->type = VBOX_HGCM_SVC_PARM_32BIT;
     113    pParm->u.uint32 = u32;
     114}
     115
     116static int VBoxHGCMParmUInt32Get (VBOXHGCMSVCPARM *pParm, uint32_t *pu32)
     117{
     118    if (pParm->type == VBOX_HGCM_SVC_PARM_32BIT)
     119    {
     120        *pu32 = pParm->u.uint32;
     121        return VINF_SUCCESS;
     122    }
     123
     124    return VERR_INVALID_PARAMETER;
     125}
     126
     127#if 0
     128static void VBoxHGCMParmPtrSet (VBOXHGCMSVCPARM *pParm, void *pv, uint32_t cb)
     129{
     130    pParm->type             = VBOX_HGCM_SVC_PARM_PTR;
     131    pParm->u.pointer.size   = cb;
     132    pParm->u.pointer.addr   = pv;
     133}
     134#endif
     135
     136static int VBoxHGCMParmPtrGet (VBOXHGCMSVCPARM *pParm, void **ppv, uint32_t *pcb)
     137{
     138    if (pParm->type == VBOX_HGCM_SVC_PARM_PTR)
     139    {
     140        *ppv = pParm->u.pointer.addr;
     141        *pcb = pParm->u.pointer.size;
     142        return VINF_SUCCESS;
     143    }
     144
     145    return VERR_INVALID_PARAMETER;
     146}
     147
    138148
    139149static uint32_t vboxSvcClipboardMode (void)
  • trunk/src/VBox/HostServices/SharedClipboard/x11-clipboard.cpp

    r69656 r75498  
     1/* $Id$ */
    12/** @file
    2  *
    3  * Shared Clipboard:
    4  * Linux host.
     3 * Shared Clipboard Service - Linux host.
    54 */
    65
     
    1716 */
    1817
     18
     19/*********************************************************************************************************************************
     20*   Header Files                                                                                                                 *
     21*********************************************************************************************************************************/
    1922#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
    20 
    21 #include <string.h>
    22 
    2323#include <iprt/assert.h>
    2424#include <iprt/critsect.h>
     
    2626#include <iprt/mem.h>
    2727#include <iprt/semaphore.h>
     28#include <iprt/string.h>
    2829
    2930#include <VBox/GuestHost/SharedClipboard.h>
  • trunk/src/VBox/HostServices/SharedClipboard/x11-stub.cpp

    r70243 r75498  
     1/* $Id$*/
    12/** @file
    2  *
    3  * Shared Clipboard:
    4  * Linux host, a stub version with no functionality for use on headless hosts.
     3 * Shared Clipboard Service - Linux host, a stub version with no functionality for use on headless hosts.
    54 */
    65
     
    1716 */
    1817
     18
     19/*********************************************************************************************************************************
     20*   Header Files                                                                                                                 *
     21*********************************************************************************************************************************/
     22#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
    1923#include <VBox/HostServices/VBoxClipboardSvc.h>
    2024
     
    3236
    3337#include "VBoxClipboard.h"
     38
     39
    3440
    3541/** Initialise the host side of the shared clipboard - called by the hgcm layer. */
     
    129135    LogFlowFunc(("called, returning.\n"));
    130136}
     137
  • trunk/src/VBox/HostServices/SharedFolders/mappings.cpp

    r75432 r75498  
     1/* $Id$ */
    12/** @file
    2  * Shared Folders: Mappings support.
     3 * Shared Folders Service - Mappings support.
    34 */
    45
     
    1516 */
    1617
     18
     19/*********************************************************************************************************************************
     20*   Header Files                                                                                                                 *
     21*********************************************************************************************************************************/
     22#define LOG_GROUP LOG_GROUP_SHARED_FOLDERS
    1723#ifdef UNITTEST
    1824# include "testcase/tstSharedFolderService.h"
     
    3137#endif
    3238
     39
     40/*********************************************************************************************************************************
     41*   Global Variables                                                                                                             *
     42*********************************************************************************************************************************/
    3343extern PVBOXHGCMSVCHELPERS g_pHelpers; /* service.cpp */
    3444
  • trunk/src/VBox/HostServices/SharedFolders/service.cpp

    r75407 r75498  
    1616 */
    1717
     18/*********************************************************************************************************************************
     19*   Header Files                                                                                                                 *
     20*********************************************************************************************************************************/
     21#define LOG_GROUP LOG_GROUP_SHARED_FOLDERS
    1822#include <VBox/shflsvc.h>
    19 
    2023
    2124#include "shfl.h"
     
    3033#include <VBox/vmm/pdmifs.h>
    3134
     35
     36/*********************************************************************************************************************************
     37*   Defined Constants And Macros                                                                                                 *
     38*********************************************************************************************************************************/
    3239#define SHFL_SAVED_STATE_VERSION_FOLDERNAME_UTF16       2
    3340#define SHFL_SAVED_STATE_VERSION_PRE_AUTO_MOUNT_POINT   3
    3441#define SHFL_SAVED_STATE_VERSION                        4
     42
     43
     44/*********************************************************************************************************************************
     45*   Global Variables                                                                                                             *
     46*********************************************************************************************************************************/
     47PVBOXHGCMSVCHELPERS g_pHelpers;
     48static PPDMLED      g_pStatusLed = NULL;
     49
     50/** @name Shared folder statistics.
     51 * @{ */
     52static STAMPROFILE g_StatQueryMappings;
     53static STAMPROFILE g_StatQueryMappingsFail;
     54static STAMPROFILE g_StatQueryMapName;
     55static STAMPROFILE g_StatCreate;
     56static STAMPROFILE g_StatCreateFail;
     57static STAMPROFILE g_StatLookup;
     58static STAMPROFILE g_StatLookupFail;
     59static STAMPROFILE g_StatClose;
     60static STAMPROFILE g_StatCloseFail;
     61static STAMPROFILE g_StatRead;
     62static STAMPROFILE g_StatReadFail;
     63static STAMPROFILE g_StatWrite;
     64static STAMPROFILE g_StatWriteFail;
     65static STAMPROFILE g_StatLock;
     66static STAMPROFILE g_StatLockFail;
     67static STAMPROFILE g_StatList;
     68static STAMPROFILE g_StatListFail;
     69static STAMPROFILE g_StatReadLink;
     70static STAMPROFILE g_StatReadLinkFail;
     71static STAMPROFILE g_StatMapFolderOld;
     72static STAMPROFILE g_StatMapFolder;
     73static STAMPROFILE g_StatMapFolderFail;
     74static STAMPROFILE g_StatUnmapFolder;
     75static STAMPROFILE g_StatUnmapFolderFail;
     76static STAMPROFILE g_StatInformationFail;
     77static STAMPROFILE g_StatInformationSetFile;
     78static STAMPROFILE g_StatInformationSetFileFail;
     79static STAMPROFILE g_StatInformationSetSize;
     80static STAMPROFILE g_StatInformationSetSizeFail;
     81static STAMPROFILE g_StatInformationGetFile;
     82static STAMPROFILE g_StatInformationGetFileFail;
     83static STAMPROFILE g_StatInformationGetVolume;
     84static STAMPROFILE g_StatInformationGetVolumeFail;
     85static STAMPROFILE g_StatRemove;
     86static STAMPROFILE g_StatRemoveFail;
     87static STAMPROFILE g_StatRename;
     88static STAMPROFILE g_StatRenameFail;
     89static STAMPROFILE g_StatFlush;
     90static STAMPROFILE g_StatFlushFail;
     91static STAMPROFILE g_StatSetUtf8;
     92static STAMPROFILE g_StatSymlink;
     93static STAMPROFILE g_StatSymlinkFail;
     94static STAMPROFILE g_StatSetSymlinks;
     95static STAMPROFILE g_StatQueryMapInfo;
     96static STAMPROFILE g_StatWaitForMappingsChanges;
     97static STAMPROFILE g_StatWaitForMappingsChangesFail;
     98static STAMPROFILE g_StatCancelMappingsChangesWait;
     99static STAMPROFILE g_StatUnknown;
     100/** @} */
    35101
    36102
     
    73139
    74140
    75 PVBOXHGCMSVCHELPERS g_pHelpers;
    76 static PPDMLED      pStatusLed = NULL;
    77141
    78142static DECLCALLBACK(int) svcUnload (void *)
     
    83147    vbsfFreeHandleTable();
    84148
     149    if (g_pHelpers)
     150        HGCMSvcHlpStamDeregister(g_pHelpers, "/HGCM/VBoxSharedFolders/*");
    85151    return rc;
    86152}
     
    336402{
    337403    RT_NOREF1(u32ClientID);
    338     int rc = VINF_SUCCESS;
    339 
     404#ifndef VBOX_WITHOUT_RELEASE_STATISTICS
     405    uint64_t tsStart;
     406    STAM_GET_TS(tsStart);
     407#endif
    340408    Log(("SharedFolders host service: svcCall: u32ClientID = %u, fn = %u, cParms = %u, pparms = %p\n", u32ClientID, u32Function, cParms, paParms));
    341409
     
    352420#endif
    353421
     422    int rc = VINF_SUCCESS;
     423    PSTAMPROFILE pStat, pStatFail;
    354424    switch (u32Function)
    355425    {
    356426        case SHFL_FN_QUERY_MAPPINGS:
    357427        {
     428            pStat     = &g_StatQueryMappings;
     429            pStatFail = &g_StatQueryMappingsFail;
    358430            Log(("SharedFolders host service: svcCall: SHFL_FN_QUERY_MAPPINGS\n"));
    359431
     
    415487        case SHFL_FN_QUERY_MAP_NAME:
    416488        {
     489            pStatFail = pStat = &g_StatQueryMapName;
    417490            Log(("SharedFolders host service: svcCall: SHFL_FN_QUERY_MAP_NAME\n"));
    418491
     
    456529        case SHFL_FN_CREATE:
    457530        {
     531            pStat     = &g_StatCreate;
     532            pStatFail = &g_StatCreateFail;
    458533            Log(("SharedFolders host service: svcCall: SHFL_FN_CREATE\n"));
    459534
     
    491566                else
    492567                {
     568                    if (pParms->CreateFlags & SHFL_CF_LOOKUP)
     569                    {
     570                        pStat     = &g_StatLookup;
     571                        pStatFail = &g_StatLookupFail;
     572                    }
     573
    493574                    /* Execute the function. */
    494575                    rc = vbsfCreate (pClient, root, pPath, cbPath, pParms);
     
    506587        case SHFL_FN_CLOSE:
    507588        {
     589            pStat     = &g_StatClose;
     590            pStatFail = &g_StatCloseFail;
    508591            Log(("SharedFolders host service: svcCall: SHFL_FN_CLOSE\n"));
    509592
     
    554637        /** Read object content. */
    555638        case SHFL_FN_READ:
     639            pStat     = &g_StatRead;
     640            pStatFail = &g_StatReadFail;
    556641            Log(("SharedFolders host service: svcCall: SHFL_FN_READ\n"));
    557642
     
    596681                {
    597682                    /* Execute the function. */
    598                     if (pStatusLed)
    599                     {
    600                         Assert(pStatusLed->u32Magic == PDMLED_MAGIC);
    601                         pStatusLed->Asserted.s.fReading = pStatusLed->Actual.s.fReading = 1;
     683                    if (g_pStatusLed)
     684                    {
     685                        Assert(g_pStatusLed->u32Magic == PDMLED_MAGIC);
     686                        g_pStatusLed->Asserted.s.fReading = g_pStatusLed->Actual.s.fReading = 1;
    602687                    }
    603688
    604689                    rc = vbsfRead (pClient, root, Handle, offset, &count, pBuffer);
    605                     if (pStatusLed)
    606                         pStatusLed->Actual.s.fReading = 0;
     690                    if (g_pStatusLed)
     691                        g_pStatusLed->Actual.s.fReading = 0;
    607692
    608693                    if (RT_SUCCESS(rc))
     
    621706        /** Write new object content. */
    622707        case SHFL_FN_WRITE:
     708            pStat     = &g_StatWrite;
     709            pStatFail = &g_StatWriteFail;
    623710            Log(("SharedFolders host service: svcCall: SHFL_FN_WRITE\n"));
    624711
     
    663750                {
    664751                    /* Execute the function. */
    665                     if (pStatusLed)
    666                     {
    667                         Assert(pStatusLed->u32Magic == PDMLED_MAGIC);
    668                         pStatusLed->Asserted.s.fWriting = pStatusLed->Actual.s.fWriting = 1;
     752                    if (g_pStatusLed)
     753                    {
     754                        Assert(g_pStatusLed->u32Magic == PDMLED_MAGIC);
     755                        g_pStatusLed->Asserted.s.fWriting = g_pStatusLed->Actual.s.fWriting = 1;
    669756                    }
    670757
    671758                    rc = vbsfWrite (pClient, root, Handle, offset, &count, pBuffer);
    672                     if (pStatusLed)
    673                         pStatusLed->Actual.s.fWriting = 0;
     759                    if (g_pStatusLed)
     760                        g_pStatusLed->Actual.s.fWriting = 0;
    674761
    675762                    if (RT_SUCCESS(rc))
     
    688775        /** Lock/unlock a range in the object. */
    689776        case SHFL_FN_LOCK:
     777            pStat     = &g_StatLock;
     778            pStatFail = &g_StatLockFail;
    690779            Log(("SharedFolders host service: svcCall: SHFL_FN_LOCK\n"));
    691780
     
    775864        case SHFL_FN_LIST:
    776865        {
     866            pStat     = &g_StatList;
     867            pStatFail = &g_StatListFail;
    777868            Log(("SharedFolders host service: svcCall: SHFL_FN_LIST\n"));
    778869
     
    817908                else
    818909                {
    819                     if (pStatusLed)
    820                     {
    821                         Assert(pStatusLed->u32Magic == PDMLED_MAGIC);
    822                         pStatusLed->Asserted.s.fReading = pStatusLed->Actual.s.fReading = 1;
     910                    if (g_pStatusLed)
     911                    {
     912                        Assert(g_pStatusLed->u32Magic == PDMLED_MAGIC);
     913                        g_pStatusLed->Asserted.s.fReading = g_pStatusLed->Actual.s.fReading = 1;
    823914                    }
    824915
     
    826917                    rc = vbsfDirList (pClient, root, Handle, pPath, flags, &length, pBuffer, &resumePoint, &cFiles);
    827918
    828                     if (pStatusLed)
    829                         pStatusLed->Actual.s.fReading = 0;
     919                    if (g_pStatusLed)
     920                        g_pStatusLed->Actual.s.fReading = 0;
    830921
    831922                    if (rc == VERR_NO_MORE_FILES && cFiles != 0)
     
    853944        case SHFL_FN_READLINK:
    854945        {
     946            pStat     = &g_StatReadLink;
     947            pStatFail = &g_StatReadLinkFail;
    855948            Log(("SharedFolders host service: svcCall: SHFL_FN_READLINK\n"));
    856949
     
    901994        case SHFL_FN_MAP_FOLDER_OLD:
    902995        {
     996            pStatFail = pStat = &g_StatMapFolderOld;
    903997            Log(("SharedFolders host service: svcCall: SHFL_FN_MAP_FOLDER_OLD\n"));
    904998
     
    9441038        case SHFL_FN_MAP_FOLDER:
    9451039        {
     1040            pStat     = &g_StatMapFolder;
     1041            pStatFail = &g_StatMapFolderFail;
    9461042            Log(("SharedFolders host service: svcCall: SHFL_FN_MAP_FOLDER\n"));
    9471043            if (BIT_FLAG(pClient->fu32Flags, SHFL_CF_UTF8))
     
    10141110        case SHFL_FN_UNMAP_FOLDER:
    10151111        {
     1112            pStat     = &g_StatUnmapFolder;
     1113            pStatFail = &g_StatUnmapFolderFail;
    10161114            Log(("SharedFolders host service: svcCall: SHFL_FN_UNMAP_FOLDER\n"));
    10171115            Log(("SharedFolders host service: request to unmap folder handle %u\n",
     
    10491147        case SHFL_FN_INFORMATION:
    10501148        {
     1149            pStatFail = pStat = &g_StatInformationFail;
    10511150            Log(("SharedFolders host service: svcCall: SHFL_FN_INFORMATION\n"));
    10521151
     
    10841183                    /* Execute the function. */
    10851184                    if (flags & SHFL_INFO_SET)
     1185                    {
    10861186                        rc = vbsfSetFSInfo (pClient, root, Handle, flags, &length, pBuffer);
     1187
     1188                        if (flags & SHFL_INFO_FILE)
     1189                        {
     1190                            pStat     = &g_StatInformationSetFile;
     1191                            pStatFail = &g_StatInformationSetFileFail;
     1192                        }
     1193                        else if (flags & SHFL_INFO_SIZE)
     1194                        {
     1195                            pStat     = &g_StatInformationSetSize;
     1196                            pStatFail = &g_StatInformationSetSizeFail;
     1197                        }
     1198                    }
    10871199                    else /* SHFL_INFO_GET */
     1200                    {
    10881201                        rc = vbsfQueryFSInfo (pClient, root, Handle, flags, &length, pBuffer);
     1202
     1203                        if (flags & SHFL_INFO_FILE)
     1204                        {
     1205                            pStat     = &g_StatInformationGetFile;
     1206                            pStatFail = &g_StatInformationGetFileFail;
     1207                        }
     1208                        else if (flags & SHFL_INFO_VOLUME)
     1209                        {
     1210                            pStat     = &g_StatInformationGetVolume;
     1211                            pStatFail = &g_StatInformationGetVolumeFail;
     1212                        }
     1213                    }
    10891214
    10901215                    if (RT_SUCCESS(rc))
     
    11051230        case SHFL_FN_REMOVE:
    11061231        {
     1232            pStat     = &g_StatRemove;
     1233            pStatFail = &g_StatRemoveFail;
    11071234            Log(("SharedFolders host service: svcCall: SHFL_FN_REMOVE\n"));
    11081235
     
    11481275        case SHFL_FN_RENAME:
    11491276        {
     1277            pStat     = &g_StatRename;
     1278            pStatFail = &g_StatRenameFail;
    11501279            Log(("SharedFolders host service: svcCall: SHFL_FN_RENAME\n"));
    11511280
     
    11941323        case SHFL_FN_FLUSH:
    11951324        {
     1325            pStat     = &g_StatFlush;
     1326            pStatFail = &g_StatFlushFail;
    11961327            Log(("SharedFolders host service: svcCall: SHFL_FN_FLUSH\n"));
    11971328
     
    12411372        case SHFL_FN_SET_UTF8:
    12421373        {
     1374            pStatFail = pStat = &g_StatSetUtf8;
     1375
    12431376            pClient->fu32Flags |= SHFL_CF_UTF8;
    12441377            rc = VINF_SUCCESS;
     
    12481381        case SHFL_FN_SYMLINK:
    12491382        {
     1383            pStat     = &g_StatSymlink;
     1384            pStatFail = &g_StatSymlinkFail;
    12501385            Log(("SharedFolders host service: svnCall: SHFL_FN_SYMLINK\n"));
     1386
    12511387            /* Verify parameter count and types. */
    12521388            if (cParms != SHFL_CPARMS_SYMLINK)
     
    12951431        case SHFL_FN_SET_SYMLINKS:
    12961432        {
     1433            pStatFail = pStat = &g_StatSetSymlinks;
     1434
    12971435            pClient->fu32Flags |= SHFL_CF_SYMLINKS;
    12981436            rc = VINF_SUCCESS;
     
    13021440        case SHFL_FN_QUERY_MAP_INFO:
    13031441        {
     1442            pStatFail = pStat = &g_StatQueryMapInfo;
    13041443            Log(("SharedFolders host service: svnCall: SHFL_FN_QUERY_MAP_INFO\n"));
    13051444
     
    13261465        case SHFL_FN_WAIT_FOR_MAPPINGS_CHANGES:
    13271466        {
    1328             Log(("SharedFolders host service: svnCall: SHFL_FN_WAIT_FOR_CHANGES\n"));
     1467            pStat = &g_StatWaitForMappingsChanges;
     1468            pStatFail = &g_StatWaitForMappingsChangesFail;
     1469            Log(("SharedFolders host service: svnCall: SHFL_FN_WAIT_FOR_MAPPINGS_CHANGES\n"));
    13291470
    13301471            /* Validate input: */
     
    13411482        case SHFL_FN_CANCEL_MAPPINGS_CHANGES_WAITS:
    13421483        {
     1484            pStatFail = pStat = &g_StatCancelMappingsChangesWait;
    13431485            Log(("SharedFolders host service: svnCall: SHFL_FN_CANCEL_WAIT_FOR_CHANGES\n"));
    13441486
     
    13541496        default:
    13551497        {
     1498            pStatFail = pStat = &g_StatUnknown;
    13561499            rc = VERR_NOT_IMPLEMENTED;
    13571500            break;
     
    13691512        g_pHelpers->pfnCallComplete (callHandle, rc);
    13701513    }
     1514
     1515#ifndef VBOX_WITHOUT_RELEASE_STATISTICS
     1516    /* Statistics: */
     1517    uint64_t cTicks;
     1518    STAM_GET_TS(cTicks);
     1519    cTicks -= tsStart;
     1520    if (RT_SUCCESS(rc))
     1521        STAM_REL_PROFILE_ADD_PERIOD(pStat, cTicks);
     1522    else
     1523        STAM_REL_PROFILE_ADD_PERIOD(pStatFail, cTicks);
     1524#endif
    13711525
    13721526    LogFlow(("\n"));        /* Add a new line to differentiate between calls more easily. */
     
    15381692            {
    15391693                /* Execute the function. */
    1540                 pStatusLed = pLed;
     1694                g_pStatusLed = pLed;
    15411695                rc = VINF_SUCCESS;
    15421696            }
     
    15981752
    15991753        vbsfMappingInit();
     1754
     1755        /* Finally, register statistics if everything went well: */
     1756        if (RT_SUCCESS(rc))
     1757        {
     1758             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatQueryMappings,             STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_QUERY_MAPPINGS successes",          "/HGCM/VBoxSharedFolders/FnQueryMappings");
     1759             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatQueryMappingsFail,         STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_QUERY_MAPPINGS failures",           "/HGCM/VBoxSharedFolders/FnQueryMappingsFail");
     1760             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatQueryMapName,              STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_QUERY_MAP_NAME",                    "/HGCM/VBoxSharedFolders/FnQueryMapName");
     1761             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatCreate,                    STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_CREATE/CREATE successes",           "/HGCM/VBoxSharedFolders/FnCreate");
     1762             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatCreateFail,                STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_CREATE/CREATE failures",            "/HGCM/VBoxSharedFolders/FnCreateFail");
     1763             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatLookup,                    STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_CREATE/LOOKUP successes",           "/HGCM/VBoxSharedFolders/FnLookup");
     1764             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatLookupFail,                STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_CREATE/LOOKUP failures",            "/HGCM/VBoxSharedFolders/FnLookupFail");
     1765             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatClose,                     STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_CLOSE successes",                   "/HGCM/VBoxSharedFolders/FnClose");
     1766             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatCloseFail,                 STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_CLOSE failures",                    "/HGCM/VBoxSharedFolders/FnCloseFail");
     1767             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatRead,                      STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_READ successes",                    "/HGCM/VBoxSharedFolders/FnRead");
     1768             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatReadFail,                  STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_READ failures",                     "/HGCM/VBoxSharedFolders/FnReadFail");
     1769             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatWrite,                     STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_WRITE successes",                   "/HGCM/VBoxSharedFolders/FnWrite");
     1770             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatWriteFail,                 STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_WRITE failures",                    "/HGCM/VBoxSharedFolders/FnWriteFail");
     1771             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatLock,                      STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_LOCK successes",                    "/HGCM/VBoxSharedFolders/FnLock");
     1772             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatLockFail,                  STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_LOCK failures",                     "/HGCM/VBoxSharedFolders/FnLockFail");
     1773             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatList,                      STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_LIST successes",                    "/HGCM/VBoxSharedFolders/FnList");
     1774             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatListFail,                  STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_LIST failures",                     "/HGCM/VBoxSharedFolders/FnListFail");
     1775             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatReadLink,                  STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_READLINK successes",                "/HGCM/VBoxSharedFolders/FnReadLink");
     1776             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatReadLinkFail,              STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_READLINK failures",                 "/HGCM/VBoxSharedFolders/FnReadLinkFail");
     1777             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatMapFolderOld,              STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_MAP_FOLDER_OLD",                    "/HGCM/VBoxSharedFolders/FnMapFolderOld");
     1778             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatMapFolder,                 STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_MAP_FOLDER successes",              "/HGCM/VBoxSharedFolders/FnMapFolder");
     1779             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatMapFolderFail,             STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_MAP_FOLDER failures",               "/HGCM/VBoxSharedFolders/FnMapFolderFail");
     1780             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatUnmapFolder,               STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_UNMAP_FOLDER successes",            "/HGCM/VBoxSharedFolders/FnUnmapFolder");
     1781             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatUnmapFolderFail,           STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_UNMAP_FOLDER failures",             "/HGCM/VBoxSharedFolders/FnUnmapFolderFail");
     1782             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatInformationFail,           STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_INFORMATION early failures",        "/HGCM/VBoxSharedFolders/FnInformationFail");
     1783             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatInformationSetFile,        STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_INFORMATION/SET/FILE successes",    "/HGCM/VBoxSharedFolders/FnInformationSetFile");
     1784             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatInformationSetFileFail,    STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_INFORMATION/SET/FILE failures",     "/HGCM/VBoxSharedFolders/FnInformationSetFileFail");
     1785             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatInformationSetSize,        STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_INFORMATION/SET/SIZE successes",    "/HGCM/VBoxSharedFolders/FnInformationSetSize");
     1786             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatInformationSetSizeFail,    STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_INFORMATION/SET/SIZE failures",     "/HGCM/VBoxSharedFolders/FnInformationSetSizeFail");
     1787             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatInformationGetFile,        STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_INFORMATION/GET/FILE successes",    "/HGCM/VBoxSharedFolders/FnInformationGetFile");
     1788             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatInformationGetFileFail,    STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_INFORMATION/GET/FILE failures",     "/HGCM/VBoxSharedFolders/FnInformationGetFileFail");
     1789             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatInformationGetVolume,      STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_INFORMATION/GET/VOLUME successes",  "/HGCM/VBoxSharedFolders/FnInformationGetVolume");
     1790             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatInformationGetVolumeFail,  STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_INFORMATION/GET/VOLUME failures",   "/HGCM/VBoxSharedFolders/FnInformationGetVolumeFail");
     1791             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatRemove,                    STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_REMOVE successes",                  "/HGCM/VBoxSharedFolders/FnRemove");
     1792             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatRemoveFail,                STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_REMOVE failures",                   "/HGCM/VBoxSharedFolders/FnRemoveFail");
     1793             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatRename,                    STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_RENAME successes",                  "/HGCM/VBoxSharedFolders/FnRename");
     1794             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatRenameFail,                STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_RENAME failures",                   "/HGCM/VBoxSharedFolders/FnRenameFail");
     1795             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatFlush,                     STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_FLUSH successes",                   "/HGCM/VBoxSharedFolders/FnFlush");
     1796             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatFlushFail,                 STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_FLUSH failures",                    "/HGCM/VBoxSharedFolders/FnFlushFail");
     1797             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatSetUtf8,                   STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_SET_UTF8",                          "/HGCM/VBoxSharedFolders/FnSetUtf8");
     1798             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatSymlink,                   STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_SYMLINK successes",                 "/HGCM/VBoxSharedFolders/FnSymlink");
     1799             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatSymlinkFail,               STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_SYMLINK failures",                  "/HGCM/VBoxSharedFolders/FnSymlinkFail");
     1800             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatSetSymlinks,               STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_SET_SYMLINKS",                      "/HGCM/VBoxSharedFolders/FnSetSymlink");
     1801             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatQueryMapInfo,              STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_QUERY_MAP_INFO",                    "/HGCM/VBoxSharedFolders/FnQueryMapInfo");
     1802             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatWaitForMappingsChanges,    STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_WAIT_FOR_MAPPINGS_CHANGES successes", "/HGCM/VBoxSharedFolders/FnWaitForMappingsChanges");
     1803             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatWaitForMappingsChangesFail,STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_WAIT_FOR_MAPPINGS_CHANGES failures","/HGCM/VBoxSharedFolders/FnWaitForMappingsChangesFail");
     1804             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatCancelMappingsChangesWait, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_CANCEL_MAPPINGS_CHANGES_WAITS",     "/HGCM/VBoxSharedFolders/FnCancelMappingsChangesWaits");
     1805             HGCMSvcHlpStamRegister(g_pHelpers, &g_StatUnknown,                   STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS, "SHFL_FN_???",                               "/HGCM/VBoxSharedFolders/FnUnknown");
     1806        }
    16001807    }
    16011808
  • trunk/src/VBox/HostServices/SharedFolders/shfl.h

    r75407 r75498  
    2121#include <VBox/hgcmsvc.h>
    2222
    23 #define LOG_GROUP LOG_GROUP_SHARED_FOLDERS
    2423#include <VBox/log.h>
    2524
  • trunk/src/VBox/HostServices/SharedFolders/shflhandle.cpp

    r69500 r75498  
     1/* $Id$ */
    12/** @file
    2  *
    3  * Shared Folders:
    4  * Handles helper functions.
     3 * Shared Folders Service - Handles helper functions.
    54 */
    65
     
    1716 */
    1817
     18
     19/*********************************************************************************************************************************
     20*   Header Files                                                                                                                 *
     21*********************************************************************************************************************************/
     22#define LOG_GROUP LOG_GROUP_SHARED_FOLDERS
    1923#include "shflhandle.h"
    2024#include <iprt/alloc.h>
     
    2327
    2428
    25 /*
     29/*********************************************************************************************************************************
     30*   Structures and Typedefs                                                                                                      *
     31*********************************************************************************************************************************/
     32/**
    2633 * Very basic and primitive handle management. Should be sufficient for our needs.
    2734 * Handle allocation can be rather slow, but at least lookup is fast.
    28  *
    2935 */
    3036typedef struct
     
    3541} SHFLINTHANDLE, *PSHFLINTHANDLE;
    3642
     43
     44/*********************************************************************************************************************************
     45*   Global Variables                                                                                                             *
     46*********************************************************************************************************************************/
    3747static SHFLINTHANDLE *g_pHandles = NULL;
    3848static int32_t        gLastHandleIndex = 0;
    3949static RTCRITSECT     gLock;
     50
    4051
    4152int vbsfInitHandleTable()
     
    213224        AssertFailed();
    214225}
     226
  • trunk/src/VBox/HostServices/SharedFolders/vbsf.cpp

    r75336 r75498  
    1616 */
    1717
     18/*********************************************************************************************************************************
     19*   Header Files                                                                                                                 *
     20*********************************************************************************************************************************/
     21#define LOG_GROUP LOG_GROUP_SHARED_FOLDERS
    1822#ifdef UNITTEST
    1923# include "testcase/tstSharedFolderService.h"
     
    4448#endif
    4549
     50
     51/*********************************************************************************************************************************
     52*   Defined Constants And Macros                                                                                                 *
     53*********************************************************************************************************************************/
    4654#define SHFL_RT_LINK(pClient) ((pClient)->fu32Flags & SHFL_CF_SYMLINKS ? RTPATH_F_ON_LINK : RTPATH_F_FOLLOW_LINK)
     55
    4756
    4857/**
  • trunk/src/VBox/HostServices/SharedFolders/vbsfpath.cpp

    r69753 r75498  
    11/* $Id$ */
    22/** @file
    3  * Shared Folders - guest/host path convertion and verification.
     3 * Shared Folders Service - guest/host path convertion and verification.
    44 */
    55
     
    1616 */
    1717
     18/*********************************************************************************************************************************
     19*   Header Files                                                                                                                 *
     20*********************************************************************************************************************************/
     21#define LOG_GROUP LOG_GROUP_SHARED_FOLDERS
    1822#ifdef UNITTEST
    1923# include "testcase/tstSharedFolderService.h"
     
    4448#endif
    4549
     50
     51/*********************************************************************************************************************************
     52*   Defined Constants And Macros                                                                                                 *
     53*********************************************************************************************************************************/
    4654#define SHFL_RT_LINK(pClient) ((pClient)->fu32Flags & SHFL_CF_SYMLINKS ? RTPATH_F_ON_LINK : RTPATH_F_FOLLOW_LINK)
     55
    4756
    4857/**
     
    689698    RTMemFree(pszHostPath);
    690699}
     700
  • trunk/src/VBox/HostServices/SharedFolders/vbsfpathabs.cpp

    r66090 r75498  
    11/* $Id$ */
    22/** @file
    3  * Shared Folders - guest/host path convertion and verification.
     3 * Shared Folders Service - guest/host path convertion and verification.
    44 */
    55
     
    1616 */
    1717
     18/*********************************************************************************************************************************
     19*   Header Files                                                                                                                 *
     20*********************************************************************************************************************************/
     21#define LOG_GROUP LOG_GROUP_SHARED_FOLDERS
    1822#include <iprt/path.h>
    1923#include <iprt/string.h>
     24
    2025
    2126#if defined(RT_OS_WINDOWS)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette