Changeset 1659


Ignore:
Timestamp:
Jan 3, 2008 6:48:58 PM (16 years ago)
Author:
bennylp
Message:

Print stack usage upon thread exiting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/os_core_win32.c

    r1589 r1659  
    199199    int i; 
    200200 
     201    /* Display stack usage */ 
     202#if defined(PJ_OS_HAS_CHECK_STACK) && PJ_OS_HAS_CHECK_STACK!=0 
     203    { 
     204        pj_thread_t *rec = (pj_thread_t*)main_thread; 
     205        PJ_LOG(5,(rec->obj_name, "Main thread stack max usage=%u by %s:%d",  
     206                  rec->stk_max_usage, rec->caller_file, rec->caller_line)); 
     207    } 
     208#endif 
     209 
    201210    /* Call atexit() functions */ 
    202211    for (i=atexit_count-1; i>=0; --i) { 
     
    350359 
    351360    PJ_LOG(6,(rec->obj_name, "Thread quitting")); 
     361#if defined(PJ_OS_HAS_CHECK_STACK) && PJ_OS_HAS_CHECK_STACK!=0 
     362    PJ_LOG(5,(rec->obj_name, "Thread stack max usage=%u by %s:%d",  
     363              rec->stk_max_usage, rec->caller_file, rec->caller_line)); 
     364#endif 
     365 
    352366    return (DWORD)result; 
    353367} 
Note: See TracChangeset for help on using the changeset viewer.