none
SOS.dll GC History commands RRS feed

  • Question

  • Hi,

    While trying to use Hist* commands of SOS.dll, I am getting the following error

    !HistInit
    Attempting to read Stress log
    ----- No thread logs in the image: The stress log was probably not initialized correctly. -----
    No Stress log in the image, GCHist commands unavailable

    Is there any other step I have to do before !HistInit ?

    full log is below.......

    !help HistInit

    -------------------------------------------------------------------------------
    !HistInit

    Before running any of the Hist - family commands you need to initialize the SOS 
    structures from the stress log saved in the debuggee.  This is achieved by the 
    HistInit command.

    Sample output:

    0:001> !HistInit
    Attempting to read Stress log
    STRESS LOG:
       facilitiesToLog  = 0xffffffff
       levelToLog       = 6
       MaxLogSizePerThread = 0x10000 (65536)
       MaxTotalLogSize = 0x1000000 (16777216)
       CurrentTotalLogChunk = 9
       ThreadsWithLogs  = 3
       Clock frequency  = 3.392 GHz
       Start time         15:26:31
       Last message time  15:26:56
       Total elapsed time 25.077 sec
    .....................................
    ---------------------------- 2407 total entries -----------------------------


    SUCCESS: GCHist structures initialized


    !HistInit
    Attempting to read Stress log
    ----- No thread logs in the image: The stress log was probably not initialized correctly. -----
    No Stress log in the image, GCHist commands unavailable

    !HistClear
    Completed successfully.

    !HistInit
    Attempting to read Stress log
    ----- No thread logs in the image: The stress log was probably not initialized correctly. -----
    No Stress log in the image, GCHist commands unavailable

    Thanks,

    Rizwan Sharif

    Friday, May 25, 2012 12:26 PM

Answers

  • Hi, 

    This is because StressLog is not enabled in your system. 

    How to enable? 

    To enable the stress log, set the following registry keys under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework:

    • (DWORD) StressLog = 1
    • (DWORD) LogFacility = 0xffffffff
    • (DWORD) StressLogSize = 65536

    The optional -addr option lets you specify a stress log other than the default log.

    Be aware of taking backup of registry before changes.

    From following link: http://msdn.microsoft.com/en-in/library/bb190764.aspx

    I hope this helps you...


    If this post answers your question, please click "Mark As Answer". If this post is helpful please click "Mark as Helpful".

    Friday, May 25, 2012 5:48 PM