Changeset 3591


Ignore:
Timestamp:
Sep 23, 2007, 8:16:48 AM (18 years ago)
Author:
bird
Message:

Added KPRF2_AFFINITY for dealing with crappy TSC on AMD CPUs. Fixed bug in kPrfGetEnvValue.

Location:
trunk/kStuff/kProfiler2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/kStuff/kProfiler2/Makefile.kmk

    r3586 r3591  
    7272TEMPLATE_kPrf2_INCS             = \
    7373        ../include
    74 #TEMPLATE_kPrf2_INCS.win            = \
    75 #       $(PATH_DEV)/x86.win32/vcc70/include \
    76 #       $(PATH_DEV)/x86.win32/sdk200209/include
    7774
    7875TEMPLATE_kPrf2_LDFLAGS.freebsd  = -g
  • trunk/kStuff/kProfiler2/kProfileR3.cpp

    r3566 r3591  
    12671267        uValue *= uBase;
    12681268        uValue += ch;
     1269        psz++;
    12691270    }
    12701271
     
    14351436    KU32    cStacks    = kPrfGetEnvValue("KPRF2_CSTACKS",    48);
    14361437    KU32    cFrames    = kPrfGetEnvValue("KPRF2_CFRAMES",    448);
     1438    KU32    fAffinity  = kPrfGetEnvValue("KPRF2_AFFINITY",   0);
    14371439
    14381440    KU32    cb = KPRF_NAME(CalcSize)(cFunctions, cbModSegs, cThreads, cStacks, cFrames);
     
    14741476#endif
    14751477                    {
     1478                        /*
     1479                         * Apply the affinity mask, if specified.
     1480                         */
     1481                        if (fAffinity)
     1482                        {
     1483#if defined(KPRF_OS_WINDOWS)
     1484                            SetProcessAffinityMask(GetCurrentProcess(), fAffinity);
     1485#endif
     1486                        }
     1487
    14761488                        g_pHdr = pHdr;
    14771489                        g_fEnabled = true;
Note: See TracChangeset for help on using the changeset viewer.