Exemplo n.º 1
0
//synchronized
void PerfTraceEvent::End(
    /* [in] */ String name)
{
    AutoLock lock(this);
    const Int64 eventId = name.HashCode();
    TraceEvent::FinishAsync(name, eventId);
    if (sEnabled && MatchesFilter(name)) {
        if (sTrackTiming) {
            SavePerfString(name, eventId, EventType.FINISH, FALSE);
        }
        // Done after calculating the ending perf data to ensure calculating the memory usage
        // does not influence the timing data.
        if (sTrackMemory) {
            SavePerfString(MakeMemoryTraceNameFromTimingName(name), eventId, EventType::FINISH,
                    TRUE);
        }
    }
}
//synchronized
void PerfTraceEvent::End(
    /* [in] */ String name,
    /* [in] */ IMemoryInfo* memoryInfo)
{
    AutoLock lock(this);
    Int64 eventId = name.HashCode();
    TraceEvent::FinishAsync(name, eventId);
    if (sEnabled && MatchesFilter(name)) {
        if (sTrackTiming) {
            SavePerfString(name, eventId, EventType::FINISH, FALSE);
        }
        // Done after calculating the instant perf data to ensure calculating the memory usage
        // does not influence the timing data.
        Int64 timestampUs = (System::NanoTime() - sBeginNanoTime) / 1000;
        SavePerfString(MakeMemoryTraceNameFromTimingName(name), eventId, EventType::FINISH,
                timestampUs, memoryInfo);
    }
}
Exemplo n.º 3
0
//synchronized
void PerfTraceEvent::Begin(
    /* [in] */ String name)
{
    AutoLock lock(this);
    const Int64 eventId = name.HashCode();
    TraceEvent::StartAsync(name, eventId);
    if (sEnabled && MatchesFilter(name)) {
        // Done before calculating the starting perf data to ensure calculating the memory usage
        // does not influence the timing data.
        if (sTrackMemory) {
            SavePerfString(MakeMemoryTraceNameFromTimingName(name), eventId, EventType::START,
                    TRUE);
        }
        if (sTrackTiming) {
            SavePerfString(name, eventId, EventType::START, FALSE);
        }
    }
}