VirtualBox

Changeset 11391 in vbox


Ignore:
Timestamp:
Aug 13, 2008 2:48:53 PM (16 years ago)
Author:
vboxsync
Message:

Moved annoying log messages to either level4 or private logging. Added private logging macro LogAleksey.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/log.h

    r10646 r11391  
    373373    /** bird logging. */
    374374    RTLOGGRPFLAGS_BIRD         = 0x00010000,
     375    /** aleksey logging. */
     376    RTLOGGRPFLAGS_ALEKSEY      = 0x00020000,
    375377    /** NoName logging. */
    376     RTLOGGRPFLAGS_NONAME       = 0x00020000
     378    RTLOGGRPFLAGS_NONAME       = 0x00040000
    377379} RTLOGGRPFLAGS;
    378380
     
    554556#define LogBird(a)      LogIt(LOG_INSTANCE, RTLOGGRPFLAGS_BIRD,     LOG_GROUP, a)
    555557
     558/** @def LogAleksey
     559 * aleksey logging.
     560 */
     561#define LogAleksey(a)   LogIt(LOG_INSTANCE, RTLOGGRPFLAGS_ALEKSEY,  LOG_GROUP, a)
     562
    556563/** @def LogNoName
    557564 * NoName logging.
  • trunk/src/VBox/Main/Performance.cpp

    r11383 r11391  
    102102        {
    103103            mLastSampleTaken = nowAt;
    104             LogFlowThisFunc (("Collecting data for obj(%p)...\n", (void *)mObject));
     104            Log4(("{%p} " LOG_FN_FMT ": Collecting data for obj(%p)...\n", this, __PRETTY_FUNCTION__, (void *)mObject));
    105105            collect();
    106106        }
     
    437437    ElementList::const_iterator it;
    438438
    439     LogFlowThisFunc(("Filter::match(%p, %s)\n", static_cast<const IUnknown*> (object), name.c_str()));
     439    LogAleksey(("Filter::match(%p, %s)\n", static_cast<const IUnknown*> (object), name.c_str()));
    440440    for (it = mElements.begin(); it != mElements.end(); it++)
    441441    {
    442         LogFlowThisFunc(("...matching against(%p, %s)\n", static_cast<const IUnknown*> ((*it).first), (*it).second.c_str()));
     442        LogAleksey(("...matching against(%p, %s)\n", static_cast<const IUnknown*> ((*it).first), (*it).second.c_str()));
    443443        if ((*it).first.isNull() || (*it).first == object)
    444444        {
     
    451451        }
    452452    }
    453     LogFlowThisFunc(("...no matches!\n"));
     453    LogAleksey(("...no matches!\n"));
    454454    return false;
    455455}
  • trunk/src/VBox/Main/PerformanceImpl.cpp

    r11377 r11391  
    385385void PerformanceCollector::registerBaseMetric (pm::BaseMetric *baseMetric)
    386386{
    387     LogFlowThisFuncEnter();
     387    //LogFlowThisFuncEnter();
    388388    AutoCaller autoCaller (this);
    389389    if (!SUCCEEDED (autoCaller.rc())) return;
    390390
    391391    AutoWriteLock alock (this);
    392     LogFlowThisFunc (("obj=%p name=%s\n", (void *)baseMetric->getObject(), baseMetric->getName()));
     392    LogAleksey(("{%p} " LOG_FN_FMT ": obj=%p name=%s\n", this, __PRETTY_FUNCTION__, (void *)baseMetric->getObject(), baseMetric->getName()));
    393393    m.baseMetrics.push_back (baseMetric);
    394     LogFlowThisFuncLeave();
     394    //LogFlowThisFuncLeave();
    395395}
    396396
    397397void PerformanceCollector::registerMetric (pm::Metric *metric)
    398398{
    399     LogFlowThisFuncEnter();
     399    //LogFlowThisFuncEnter();
    400400    AutoCaller autoCaller (this);
    401401    if (!SUCCEEDED (autoCaller.rc())) return;
    402402
    403403    AutoWriteLock alock (this);
    404     LogFlowThisFunc (("obj=%p name=%s\n", (void *)metric->getObject(), metric->getName()));
     404    LogAleksey(("{%p} " LOG_FN_FMT ": obj=%p name=%s\n", this, __PRETTY_FUNCTION__, (void *)metric->getObject(), metric->getName()));
    405405    m.metrics.push_back (metric);
    406     LogFlowThisFuncLeave();
     406    //LogFlowThisFuncLeave();
    407407}
    408408
    409409void PerformanceCollector::unregisterBaseMetricsFor (const ComPtr <IUnknown> &aObject)
    410410{
    411     LogFlowThisFuncEnter();
     411    //LogFlowThisFuncEnter();
    412412    AutoCaller autoCaller (this);
    413413    if (!SUCCEEDED (autoCaller.rc())) return;
    414414
    415415    AutoWriteLock alock (this);
    416     LogFlowThisFunc (("before remove_if: m.baseMetrics.size()=%d, obj=%p\n", m.baseMetrics.size(), (void *)aObject));
     416    LogAleksey(("{%p} " LOG_FN_FMT ": before remove_if: m.baseMetrics.size()=%d\n", this, __PRETTY_FUNCTION__, m.baseMetrics.size()));
    417417    BaseMetricList::iterator it = std::remove_if (
    418418        m.baseMetrics.begin(), m.baseMetrics.end(), std::bind2nd (
    419419            std::mem_fun (&pm::BaseMetric::associatedWith), aObject));
    420420    m.baseMetrics.erase(it, m.baseMetrics.end());
    421     LogFlowThisFunc (("after remove_if: m.baseMetrics.size()=%d\n", m.baseMetrics.size()));
    422     LogFlowThisFuncLeave();
     421    LogAleksey(("{%p} " LOG_FN_FMT ": after remove_if: m.baseMetrics.size()=%d\n", this, __PRETTY_FUNCTION__, m.baseMetrics.size()));
     422    //LogFlowThisFuncLeave();
    423423}
    424424
    425425void PerformanceCollector::unregisterMetricsFor (const ComPtr <IUnknown> &aObject)
    426426{
    427     LogFlowThisFuncEnter();
     427    //LogFlowThisFuncEnter();
    428428    AutoCaller autoCaller (this);
    429429    if (!SUCCEEDED (autoCaller.rc())) return;
    430430
    431431    AutoWriteLock alock (this);
    432     LogFlowThisFunc (("obj=%p\n", (void *)aObject));
     432    LogAleksey(("{%p} " LOG_FN_FMT ": obj=%p\n", this, __PRETTY_FUNCTION__, (void *)aObject));
    433433    MetricList::iterator it = std::remove_if (
    434434        m.metrics.begin(), m.metrics.end(), std::bind2nd (
    435435            std::mem_fun (&pm::Metric::associatedWith), aObject));
    436436    m.metrics.erase(it, m.metrics.end());
    437     LogFlowThisFuncLeave();
     437    //LogFlowThisFuncLeave();
    438438}
    439439
     
    457457void PerformanceCollector::samplerCallback()
    458458{
    459     LogFlowThisFuncEnter();
     459    Log4(("{%p} " LOG_FN_FMT ": ENTER\n", this, __PRETTY_FUNCTION__));
    460460    AutoWriteLock alock (this);
    461461
     
    464464                   std::bind2nd (std::mem_fun (&pm::BaseMetric::collectorBeat),
    465465                                 timestamp));
    466     LogFlowThisFuncLeave();
     466    Log4(("{%p} " LOG_FN_FMT ": LEAVE\n", this, __PRETTY_FUNCTION__));
    467467}
    468468
  • trunk/src/VBox/Runtime/common/log/log.cpp

    r10737 r11391  
    11401140            { "b",          RTLOGGRPFLAGS_BIRD },
    11411141            { "bird",       RTLOGGRPFLAGS_BIRD },
     1142            { "aleksey",    RTLOGGRPFLAGS_ALEKSEY },
    11421143            { "n",          RTLOGGRPFLAGS_NONAME },
    11431144            { "noname",     RTLOGGRPFLAGS_NONAME }
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