perfsrv/memspy/CommandLine/Include/MemSpyCommands.h
changeset 48 516af714ebb4
equal deleted inserted replaced
45:185201be11b0 48:516af714ebb4
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef MEMSPYCOMMANDS_H
       
    19 #define MEMSPYCOMMANDS_H
       
    20 
       
    21 // Literal constants
       
    22 _LIT( KMemSpyCLINewLine, "\r\n" );
       
    23 _LIT( KMemSpyCLIName, "MemSpy CommandLineInterpreter" );
       
    24 _LIT( KMemSpyCLIInputPrompt, " > %S" );
       
    25 _LIT( KMemSpyCLIWildcardCharacter, "*" );
       
    26 
       
    27 // Numerical constants
       
    28 const TInt KMemSpyMaxDisplayLengthThreadName = 48;
       
    29 const TInt KMemSpyMaxDisplayLengthSizeText = 14;
       
    30 const TInt KMemSpyMaxInputBufferLength = 200;
       
    31 
       
    32 // Key constants (S60)
       
    33 const TInt KMemSpyUiS60KeyCodeButtonOk = 2000;
       
    34 const TInt KMemSpyUiS60KeyCodeButtonCancel = 2001;
       
    35 const TInt KMemSpyUiS60KeyCodeRockerEnter = 63557;
       
    36 
       
    37 // Status messages
       
    38 _LIT( KOutputChangeMessage, "Change output mode opetarion in progress" );
       
    39 _LIT( KHeapDumpMessage, "Heap dump opetarion in progress" );
       
    40 _LIT( KSWMTMessage, "System Wide Memory Tracking opetarion in progress" );
       
    41 
       
    42 // Help text
       
    43 _LIT( KHelpMessage, "=== MemSpy CommandLineInterpreter Help ===\r\n" );
       
    44 _LIT( KHelpOutputCommand, "Change output mode to trace: 'memspy output trace'\r\n" );
       
    45 _LIT( KHelpOutputToFileCommand, "Change output mode to trace: 'memspy output file'\r\n" );
       
    46 _LIT( KHelpHeapDumpCommand, "Heap dump: 'memspy heapdup <all | kernel | user heap filter >'\r\n" );
       
    47 _LIT( KHelpSwmtCommand, "SWMT: 'memspy swmt <starttimer <value in seconds> | stop timer | dumpnow > <categories>'\r\n" );
       
    48 _LIT( KHelpKillServerCommand, "Kill server: 'memspy killserver'\r\n" );
       
    49 _LIT( KHelpCommand, "Press 'c' to continue" );
       
    50 
       
    51 //new commands
       
    52 
       
    53 //HELP
       
    54 _LIT( KMemSpyCmdHelp1, "-?" );
       
    55 _LIT( KMemSpyCmdHelp2, "-h" );
       
    56 _LIT( KMemSpyCmdHelp3, "-help" );
       
    57 _LIT( KMemSpyCmdHelp4, "--help" );
       
    58 
       
    59 //OUTPUT
       
    60 _LIT( KMemSpyCmdOutput, "output" );
       
    61 _LIT( KMemSpyCmdOutputParameterTrace, "trace" );
       
    62 _LIT( KMemSpyCmdOutputParameterFile, "file" );
       
    63 //<directory> //parameter to be parsed
       
    64 
       
    65 //HEAP DUMP
       
    66 _LIT( KMemSpyCmdHeapDump, "heapdump" );
       
    67 _LIT( KMemSpyCmdHeapDumpParameterAll, "all" ); //default
       
    68 _LIT( KMemSpyCmdHeapDumpParameterKernel, "kernel" ); //kernel heap dump
       
    69 
       
    70 //SWMT
       
    71 _LIT( KMemSpyCmdSwmt, "swmt" );
       
    72 _LIT( KMemSpyCmdSwmtParameterStarttimer, "starttimer" ); //<value in seconds> optionaly
       
    73 _LIT( KMemSpyCmdSwmtParameterStoptimer, "stoptimer" );
       
    74 _LIT( KMemSpyCmdSwmtParameterDumpnow, "dumpnow" );
       
    75 
       
    76 //KILL SERVER
       
    77 _LIT( KMemSpyCmdKillServer, "killserver"); //kills the server in case of it is running
       
    78 
       
    79 //SWMT CATEGORIES (TYPES)
       
    80 _LIT( KMemSpyCmdSWMTTypeHeap,                    "heap" );
       
    81 _LIT( KMemSpyCmdSWMTTypeChunk,                   "chnk" );
       
    82 _LIT( KMemSpyCmdSWMTTypeCode,                    "code" );
       
    83 _LIT( KMemSpyCmdSWMTTypeStack,                   "stak" );
       
    84 _LIT( KMemSpyCmdSWMTTypeGlobalData,              "glob" );
       
    85 _LIT( KMemSpyCmdSWMTTypeRamDrive,                "ramd" );
       
    86 _LIT( KMemSpyCmdSWMTTypeOpenFile,                "file" );
       
    87 _LIT( KMemSpyCmdSWMTTypeDiskSpace,               "disk" );
       
    88 _LIT( KMemSpyCmdSWMTTypeHandleGeneric,           "hgen" );
       
    89 _LIT( KMemSpyCmdSWMTTypeFbserv,                  "fabs" );
       
    90 _LIT( KMemSpyCmdSWMTTypeFileServerCache,         "f32c" );
       
    91 _LIT( KMemSpyCmdSWMTTypeSystemMemory,            "sysm" );
       
    92 _LIT( KMemSpyCmdSWMTTypeWindowGroup,             "wndg" );
       
    93 _LIT( KMemSpyCmdSWMTTypeAll,					 "all"	); //default value, dumps all categories expect heap dumps	
       
    94 #endif