gecko-dev/tools/profiler/core/ProfileBuffer.h

174 строки
7.0 KiB
C
Исходник Обычный вид История

Bug 1178892 - Split the profiler into Core & Gecko files and break apart monolithic headers. r=mstange --HG-- rename : tools/profiler/EHABIStackWalk.cpp => tools/profiler/core/EHABIStackWalk.cpp rename : tools/profiler/EHABIStackWalk.h => tools/profiler/core/EHABIStackWalk.h rename : tools/profiler/TableTicker.cpp => tools/profiler/core/GeckoSampler.cpp rename : tools/profiler/TableTicker.h => tools/profiler/core/GeckoSampler.h rename : tools/profiler/IntelPowerGadget.cpp => tools/profiler/core/IntelPowerGadget.cpp rename : tools/profiler/IntelPowerGadget.h => tools/profiler/core/IntelPowerGadget.h rename : tools/profiler/PlatformMacros.h => tools/profiler/core/PlatformMacros.h rename : tools/profiler/ProfileEntry.cpp => tools/profiler/core/ProfileEntry.cpp rename : tools/profiler/ProfileEntry.h => tools/profiler/core/ProfileEntry.h rename : tools/profiler/ProfileJSONWriter.cpp => tools/profiler/core/ProfileJSONWriter.cpp rename : tools/profiler/ProfileJSONWriter.h => tools/profiler/core/ProfileJSONWriter.h rename : tools/profiler/ProfilerBacktrace.cpp => tools/profiler/core/ProfilerBacktrace.cpp rename : tools/profiler/ProfilerMarkers.cpp => tools/profiler/core/ProfilerMarkers.cpp rename : tools/profiler/SyncProfile.cpp => tools/profiler/core/SyncProfile.cpp rename : tools/profiler/SyncProfile.h => tools/profiler/core/SyncProfile.h rename : tools/profiler/platform-linux.cc => tools/profiler/core/platform-linux.cc rename : tools/profiler/platform-macos.cc => tools/profiler/core/platform-macos.cc rename : tools/profiler/platform-win32.cc => tools/profiler/core/platform-win32.cc rename : tools/profiler/platform.cpp => tools/profiler/core/platform.cpp rename : tools/profiler/platform.h => tools/profiler/core/platform.h rename : tools/profiler/shared-libraries-linux.cc => tools/profiler/core/shared-libraries-linux.cc rename : tools/profiler/shared-libraries-macos.cc => tools/profiler/core/shared-libraries-macos.cc rename : tools/profiler/shared-libraries-win32.cc => tools/profiler/core/shared-libraries-win32.cc rename : tools/profiler/shim_mac_dump_syms.h => tools/profiler/core/shim_mac_dump_syms.h rename : tools/profiler/shim_mac_dump_syms.mm => tools/profiler/core/shim_mac_dump_syms.mm rename : tools/profiler/v8-support.h => tools/profiler/core/v8-support.h rename : tools/profiler/ProfileGatherer.cpp => tools/profiler/gecko/ProfileGatherer.cpp rename : tools/profiler/Profiler.jsm => tools/profiler/gecko/Profiler.jsm rename : tools/profiler/ProfilerIOInterposeObserver.cpp => tools/profiler/gecko/ProfilerIOInterposeObserver.cpp rename : tools/profiler/ProfilerIOInterposeObserver.h => tools/profiler/gecko/ProfilerIOInterposeObserver.h rename : tools/profiler/SaveProfileTask.cpp => tools/profiler/gecko/SaveProfileTask.cpp rename : tools/profiler/SaveProfileTask.h => tools/profiler/gecko/SaveProfileTask.h rename : tools/profiler/ThreadResponsiveness.cpp => tools/profiler/gecko/ThreadResponsiveness.cpp rename : tools/profiler/ThreadResponsiveness.h => tools/profiler/gecko/ThreadResponsiveness.h rename : tools/profiler/local_debug_info_symbolizer.cc => tools/profiler/gecko/local_debug_info_symbolizer.cc rename : tools/profiler/local_debug_info_symbolizer.h => tools/profiler/gecko/local_debug_info_symbolizer.h rename : tools/profiler/nsIProfileSaveEvent.idl => tools/profiler/gecko/nsIProfileSaveEvent.idl rename : tools/profiler/nsIProfiler.idl => tools/profiler/gecko/nsIProfiler.idl rename : tools/profiler/nsProfiler.cpp => tools/profiler/gecko/nsProfiler.cpp rename : tools/profiler/nsProfiler.h => tools/profiler/gecko/nsProfiler.h rename : tools/profiler/nsProfilerCIID.h => tools/profiler/gecko/nsProfilerCIID.h rename : tools/profiler/nsProfilerFactory.cpp => tools/profiler/gecko/nsProfilerFactory.cpp rename : tools/profiler/nsProfilerStartParams.cpp => tools/profiler/gecko/nsProfilerStartParams.cpp rename : tools/profiler/nsProfilerStartParams.h => tools/profiler/gecko/nsProfilerStartParams.h rename : tools/profiler/AutoObjectMapper.cpp => tools/profiler/lul/AutoObjectMapper.cpp rename : tools/profiler/AutoObjectMapper.h => tools/profiler/lul/AutoObjectMapper.h rename : tools/profiler/LulCommon.cpp => tools/profiler/lul/LulCommon.cpp rename : tools/profiler/LulCommonExt.h => tools/profiler/lul/LulCommonExt.h rename : tools/profiler/LulDwarf.cpp => tools/profiler/lul/LulDwarf.cpp rename : tools/profiler/LulDwarfExt.h => tools/profiler/lul/LulDwarfExt.h rename : tools/profiler/LulDwarfInt.h => tools/profiler/lul/LulDwarfInt.h rename : tools/profiler/LulDwarfSummariser.cpp => tools/profiler/lul/LulDwarfSummariser.cpp rename : tools/profiler/LulDwarfSummariser.h => tools/profiler/lul/LulDwarfSummariser.h rename : tools/profiler/LulElf.cpp => tools/profiler/lul/LulElf.cpp rename : tools/profiler/LulElfExt.h => tools/profiler/lul/LulElfExt.h rename : tools/profiler/LulElfInt.h => tools/profiler/lul/LulElfInt.h rename : tools/profiler/LulMain.cpp => tools/profiler/lul/LulMain.cpp rename : tools/profiler/LulMain.h => tools/profiler/lul/LulMain.h rename : tools/profiler/LulMainInt.h => tools/profiler/lul/LulMainInt.h rename : tools/profiler/LulPlatformMacros.h => tools/profiler/lul/LulPlatformMacros.h rename : tools/profiler/platform-linux-lul.cpp => tools/profiler/lul/platform-linux-lul.cpp rename : tools/profiler/platform-linux-lul.h => tools/profiler/lul/platform-linux-lul.h rename : tools/profiler/GeckoProfiler.h => tools/profiler/public/GeckoProfiler.h rename : tools/profiler/GeckoProfilerFunc.h => tools/profiler/public/GeckoProfilerFunc.h rename : tools/profiler/GeckoProfilerImpl.h => tools/profiler/public/GeckoProfilerImpl.h rename : tools/profiler/ProfileGatherer.h => tools/profiler/public/ProfileGatherer.h rename : tools/profiler/ProfilerBacktrace.h => tools/profiler/public/ProfilerBacktrace.h rename : tools/profiler/ProfilerMarkers.h => tools/profiler/public/ProfilerMarkers.h rename : tools/profiler/PseudoStack.h => tools/profiler/public/PseudoStack.h rename : tools/profiler/shared-libraries.h => tools/profiler/public/shared-libraries.h rename : tools/profiler/GeckoTaskTracer.cpp => tools/profiler/tasktracer/GeckoTaskTracer.cpp rename : tools/profiler/GeckoTaskTracer.h => tools/profiler/tasktracer/GeckoTaskTracer.h rename : tools/profiler/GeckoTaskTracerImpl.h => tools/profiler/tasktracer/GeckoTaskTracerImpl.h rename : tools/profiler/SourceEventTypeMap.h => tools/profiler/tasktracer/SourceEventTypeMap.h rename : tools/profiler/TracedTaskCommon.cpp => tools/profiler/tasktracer/TracedTaskCommon.cpp rename : tools/profiler/TracedTaskCommon.h => tools/profiler/tasktracer/TracedTaskCommon.h extra : commitid : EGgqHIgsN6z
2015-06-30 22:03:45 +03:00
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef MOZ_PROFILE_BUFFER_H
#define MOZ_PROFILE_BUFFER_H
#include "platform.h"
#include "ProfileBufferEntry.h"
#include "ProfilerMarker.h"
Bug 1178892 - Split the profiler into Core & Gecko files and break apart monolithic headers. r=mstange --HG-- rename : tools/profiler/EHABIStackWalk.cpp => tools/profiler/core/EHABIStackWalk.cpp rename : tools/profiler/EHABIStackWalk.h => tools/profiler/core/EHABIStackWalk.h rename : tools/profiler/TableTicker.cpp => tools/profiler/core/GeckoSampler.cpp rename : tools/profiler/TableTicker.h => tools/profiler/core/GeckoSampler.h rename : tools/profiler/IntelPowerGadget.cpp => tools/profiler/core/IntelPowerGadget.cpp rename : tools/profiler/IntelPowerGadget.h => tools/profiler/core/IntelPowerGadget.h rename : tools/profiler/PlatformMacros.h => tools/profiler/core/PlatformMacros.h rename : tools/profiler/ProfileEntry.cpp => tools/profiler/core/ProfileEntry.cpp rename : tools/profiler/ProfileEntry.h => tools/profiler/core/ProfileEntry.h rename : tools/profiler/ProfileJSONWriter.cpp => tools/profiler/core/ProfileJSONWriter.cpp rename : tools/profiler/ProfileJSONWriter.h => tools/profiler/core/ProfileJSONWriter.h rename : tools/profiler/ProfilerBacktrace.cpp => tools/profiler/core/ProfilerBacktrace.cpp rename : tools/profiler/ProfilerMarkers.cpp => tools/profiler/core/ProfilerMarkers.cpp rename : tools/profiler/SyncProfile.cpp => tools/profiler/core/SyncProfile.cpp rename : tools/profiler/SyncProfile.h => tools/profiler/core/SyncProfile.h rename : tools/profiler/platform-linux.cc => tools/profiler/core/platform-linux.cc rename : tools/profiler/platform-macos.cc => tools/profiler/core/platform-macos.cc rename : tools/profiler/platform-win32.cc => tools/profiler/core/platform-win32.cc rename : tools/profiler/platform.cpp => tools/profiler/core/platform.cpp rename : tools/profiler/platform.h => tools/profiler/core/platform.h rename : tools/profiler/shared-libraries-linux.cc => tools/profiler/core/shared-libraries-linux.cc rename : tools/profiler/shared-libraries-macos.cc => tools/profiler/core/shared-libraries-macos.cc rename : tools/profiler/shared-libraries-win32.cc => tools/profiler/core/shared-libraries-win32.cc rename : tools/profiler/shim_mac_dump_syms.h => tools/profiler/core/shim_mac_dump_syms.h rename : tools/profiler/shim_mac_dump_syms.mm => tools/profiler/core/shim_mac_dump_syms.mm rename : tools/profiler/v8-support.h => tools/profiler/core/v8-support.h rename : tools/profiler/ProfileGatherer.cpp => tools/profiler/gecko/ProfileGatherer.cpp rename : tools/profiler/Profiler.jsm => tools/profiler/gecko/Profiler.jsm rename : tools/profiler/ProfilerIOInterposeObserver.cpp => tools/profiler/gecko/ProfilerIOInterposeObserver.cpp rename : tools/profiler/ProfilerIOInterposeObserver.h => tools/profiler/gecko/ProfilerIOInterposeObserver.h rename : tools/profiler/SaveProfileTask.cpp => tools/profiler/gecko/SaveProfileTask.cpp rename : tools/profiler/SaveProfileTask.h => tools/profiler/gecko/SaveProfileTask.h rename : tools/profiler/ThreadResponsiveness.cpp => tools/profiler/gecko/ThreadResponsiveness.cpp rename : tools/profiler/ThreadResponsiveness.h => tools/profiler/gecko/ThreadResponsiveness.h rename : tools/profiler/local_debug_info_symbolizer.cc => tools/profiler/gecko/local_debug_info_symbolizer.cc rename : tools/profiler/local_debug_info_symbolizer.h => tools/profiler/gecko/local_debug_info_symbolizer.h rename : tools/profiler/nsIProfileSaveEvent.idl => tools/profiler/gecko/nsIProfileSaveEvent.idl rename : tools/profiler/nsIProfiler.idl => tools/profiler/gecko/nsIProfiler.idl rename : tools/profiler/nsProfiler.cpp => tools/profiler/gecko/nsProfiler.cpp rename : tools/profiler/nsProfiler.h => tools/profiler/gecko/nsProfiler.h rename : tools/profiler/nsProfilerCIID.h => tools/profiler/gecko/nsProfilerCIID.h rename : tools/profiler/nsProfilerFactory.cpp => tools/profiler/gecko/nsProfilerFactory.cpp rename : tools/profiler/nsProfilerStartParams.cpp => tools/profiler/gecko/nsProfilerStartParams.cpp rename : tools/profiler/nsProfilerStartParams.h => tools/profiler/gecko/nsProfilerStartParams.h rename : tools/profiler/AutoObjectMapper.cpp => tools/profiler/lul/AutoObjectMapper.cpp rename : tools/profiler/AutoObjectMapper.h => tools/profiler/lul/AutoObjectMapper.h rename : tools/profiler/LulCommon.cpp => tools/profiler/lul/LulCommon.cpp rename : tools/profiler/LulCommonExt.h => tools/profiler/lul/LulCommonExt.h rename : tools/profiler/LulDwarf.cpp => tools/profiler/lul/LulDwarf.cpp rename : tools/profiler/LulDwarfExt.h => tools/profiler/lul/LulDwarfExt.h rename : tools/profiler/LulDwarfInt.h => tools/profiler/lul/LulDwarfInt.h rename : tools/profiler/LulDwarfSummariser.cpp => tools/profiler/lul/LulDwarfSummariser.cpp rename : tools/profiler/LulDwarfSummariser.h => tools/profiler/lul/LulDwarfSummariser.h rename : tools/profiler/LulElf.cpp => tools/profiler/lul/LulElf.cpp rename : tools/profiler/LulElfExt.h => tools/profiler/lul/LulElfExt.h rename : tools/profiler/LulElfInt.h => tools/profiler/lul/LulElfInt.h rename : tools/profiler/LulMain.cpp => tools/profiler/lul/LulMain.cpp rename : tools/profiler/LulMain.h => tools/profiler/lul/LulMain.h rename : tools/profiler/LulMainInt.h => tools/profiler/lul/LulMainInt.h rename : tools/profiler/LulPlatformMacros.h => tools/profiler/lul/LulPlatformMacros.h rename : tools/profiler/platform-linux-lul.cpp => tools/profiler/lul/platform-linux-lul.cpp rename : tools/profiler/platform-linux-lul.h => tools/profiler/lul/platform-linux-lul.h rename : tools/profiler/GeckoProfiler.h => tools/profiler/public/GeckoProfiler.h rename : tools/profiler/GeckoProfilerFunc.h => tools/profiler/public/GeckoProfilerFunc.h rename : tools/profiler/GeckoProfilerImpl.h => tools/profiler/public/GeckoProfilerImpl.h rename : tools/profiler/ProfileGatherer.h => tools/profiler/public/ProfileGatherer.h rename : tools/profiler/ProfilerBacktrace.h => tools/profiler/public/ProfilerBacktrace.h rename : tools/profiler/ProfilerMarkers.h => tools/profiler/public/ProfilerMarkers.h rename : tools/profiler/PseudoStack.h => tools/profiler/public/PseudoStack.h rename : tools/profiler/shared-libraries.h => tools/profiler/public/shared-libraries.h rename : tools/profiler/GeckoTaskTracer.cpp => tools/profiler/tasktracer/GeckoTaskTracer.cpp rename : tools/profiler/GeckoTaskTracer.h => tools/profiler/tasktracer/GeckoTaskTracer.h rename : tools/profiler/GeckoTaskTracerImpl.h => tools/profiler/tasktracer/GeckoTaskTracerImpl.h rename : tools/profiler/SourceEventTypeMap.h => tools/profiler/tasktracer/SourceEventTypeMap.h rename : tools/profiler/TracedTaskCommon.cpp => tools/profiler/tasktracer/TracedTaskCommon.cpp rename : tools/profiler/TracedTaskCommon.h => tools/profiler/tasktracer/TracedTaskCommon.h extra : commitid : EGgqHIgsN6z
2015-06-30 22:03:45 +03:00
#include "ProfileJSONWriter.h"
Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat The bulk of this commit was generated with a script, executed at the top level of a typical source code checkout. The only non-machine-generated part was modifying MFBT's moz.build to reflect the new naming. CLOSED TREE makes big refactorings like this a piece of cake. # The main substitution. find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \ xargs perl -p -i -e ' s/nsRefPtr\.h/RefPtr\.h/g; # handle includes s/nsRefPtr ?</RefPtr</g; # handle declarations and variables ' # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h. perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h # Handle nsRefPtr.h itself, a couple places that define constructors # from nsRefPtr, and code generators specially. We do this here, rather # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename # things like nsRefPtrHashtable. perl -p -i -e 's/nsRefPtr/RefPtr/g' \ mfbt/nsRefPtr.h \ xpcom/glue/nsCOMPtr.h \ xpcom/base/OwningNonNull.h \ ipc/ipdl/ipdl/lower.py \ ipc/ipdl/ipdl/builtin.py \ dom/bindings/Codegen.py \ python/lldbutils/lldbutils/utils.py # In our indiscriminate substitution above, we renamed # nsRefPtrGetterAddRefs, the class behind getter_AddRefs. Fix that up. find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \ xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g' if [ -d .git ]; then git mv mfbt/nsRefPtr.h mfbt/RefPtr.h else hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h fi --HG-- rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 08:24:48 +03:00
#include "mozilla/RefPtr.h"
#include "mozilla/RefCounted.h"
Bug 1178892 - Split the profiler into Core & Gecko files and break apart monolithic headers. r=mstange --HG-- rename : tools/profiler/EHABIStackWalk.cpp => tools/profiler/core/EHABIStackWalk.cpp rename : tools/profiler/EHABIStackWalk.h => tools/profiler/core/EHABIStackWalk.h rename : tools/profiler/TableTicker.cpp => tools/profiler/core/GeckoSampler.cpp rename : tools/profiler/TableTicker.h => tools/profiler/core/GeckoSampler.h rename : tools/profiler/IntelPowerGadget.cpp => tools/profiler/core/IntelPowerGadget.cpp rename : tools/profiler/IntelPowerGadget.h => tools/profiler/core/IntelPowerGadget.h rename : tools/profiler/PlatformMacros.h => tools/profiler/core/PlatformMacros.h rename : tools/profiler/ProfileEntry.cpp => tools/profiler/core/ProfileEntry.cpp rename : tools/profiler/ProfileEntry.h => tools/profiler/core/ProfileEntry.h rename : tools/profiler/ProfileJSONWriter.cpp => tools/profiler/core/ProfileJSONWriter.cpp rename : tools/profiler/ProfileJSONWriter.h => tools/profiler/core/ProfileJSONWriter.h rename : tools/profiler/ProfilerBacktrace.cpp => tools/profiler/core/ProfilerBacktrace.cpp rename : tools/profiler/ProfilerMarkers.cpp => tools/profiler/core/ProfilerMarkers.cpp rename : tools/profiler/SyncProfile.cpp => tools/profiler/core/SyncProfile.cpp rename : tools/profiler/SyncProfile.h => tools/profiler/core/SyncProfile.h rename : tools/profiler/platform-linux.cc => tools/profiler/core/platform-linux.cc rename : tools/profiler/platform-macos.cc => tools/profiler/core/platform-macos.cc rename : tools/profiler/platform-win32.cc => tools/profiler/core/platform-win32.cc rename : tools/profiler/platform.cpp => tools/profiler/core/platform.cpp rename : tools/profiler/platform.h => tools/profiler/core/platform.h rename : tools/profiler/shared-libraries-linux.cc => tools/profiler/core/shared-libraries-linux.cc rename : tools/profiler/shared-libraries-macos.cc => tools/profiler/core/shared-libraries-macos.cc rename : tools/profiler/shared-libraries-win32.cc => tools/profiler/core/shared-libraries-win32.cc rename : tools/profiler/shim_mac_dump_syms.h => tools/profiler/core/shim_mac_dump_syms.h rename : tools/profiler/shim_mac_dump_syms.mm => tools/profiler/core/shim_mac_dump_syms.mm rename : tools/profiler/v8-support.h => tools/profiler/core/v8-support.h rename : tools/profiler/ProfileGatherer.cpp => tools/profiler/gecko/ProfileGatherer.cpp rename : tools/profiler/Profiler.jsm => tools/profiler/gecko/Profiler.jsm rename : tools/profiler/ProfilerIOInterposeObserver.cpp => tools/profiler/gecko/ProfilerIOInterposeObserver.cpp rename : tools/profiler/ProfilerIOInterposeObserver.h => tools/profiler/gecko/ProfilerIOInterposeObserver.h rename : tools/profiler/SaveProfileTask.cpp => tools/profiler/gecko/SaveProfileTask.cpp rename : tools/profiler/SaveProfileTask.h => tools/profiler/gecko/SaveProfileTask.h rename : tools/profiler/ThreadResponsiveness.cpp => tools/profiler/gecko/ThreadResponsiveness.cpp rename : tools/profiler/ThreadResponsiveness.h => tools/profiler/gecko/ThreadResponsiveness.h rename : tools/profiler/local_debug_info_symbolizer.cc => tools/profiler/gecko/local_debug_info_symbolizer.cc rename : tools/profiler/local_debug_info_symbolizer.h => tools/profiler/gecko/local_debug_info_symbolizer.h rename : tools/profiler/nsIProfileSaveEvent.idl => tools/profiler/gecko/nsIProfileSaveEvent.idl rename : tools/profiler/nsIProfiler.idl => tools/profiler/gecko/nsIProfiler.idl rename : tools/profiler/nsProfiler.cpp => tools/profiler/gecko/nsProfiler.cpp rename : tools/profiler/nsProfiler.h => tools/profiler/gecko/nsProfiler.h rename : tools/profiler/nsProfilerCIID.h => tools/profiler/gecko/nsProfilerCIID.h rename : tools/profiler/nsProfilerFactory.cpp => tools/profiler/gecko/nsProfilerFactory.cpp rename : tools/profiler/nsProfilerStartParams.cpp => tools/profiler/gecko/nsProfilerStartParams.cpp rename : tools/profiler/nsProfilerStartParams.h => tools/profiler/gecko/nsProfilerStartParams.h rename : tools/profiler/AutoObjectMapper.cpp => tools/profiler/lul/AutoObjectMapper.cpp rename : tools/profiler/AutoObjectMapper.h => tools/profiler/lul/AutoObjectMapper.h rename : tools/profiler/LulCommon.cpp => tools/profiler/lul/LulCommon.cpp rename : tools/profiler/LulCommonExt.h => tools/profiler/lul/LulCommonExt.h rename : tools/profiler/LulDwarf.cpp => tools/profiler/lul/LulDwarf.cpp rename : tools/profiler/LulDwarfExt.h => tools/profiler/lul/LulDwarfExt.h rename : tools/profiler/LulDwarfInt.h => tools/profiler/lul/LulDwarfInt.h rename : tools/profiler/LulDwarfSummariser.cpp => tools/profiler/lul/LulDwarfSummariser.cpp rename : tools/profiler/LulDwarfSummariser.h => tools/profiler/lul/LulDwarfSummariser.h rename : tools/profiler/LulElf.cpp => tools/profiler/lul/LulElf.cpp rename : tools/profiler/LulElfExt.h => tools/profiler/lul/LulElfExt.h rename : tools/profiler/LulElfInt.h => tools/profiler/lul/LulElfInt.h rename : tools/profiler/LulMain.cpp => tools/profiler/lul/LulMain.cpp rename : tools/profiler/LulMain.h => tools/profiler/lul/LulMain.h rename : tools/profiler/LulMainInt.h => tools/profiler/lul/LulMainInt.h rename : tools/profiler/LulPlatformMacros.h => tools/profiler/lul/LulPlatformMacros.h rename : tools/profiler/platform-linux-lul.cpp => tools/profiler/lul/platform-linux-lul.cpp rename : tools/profiler/platform-linux-lul.h => tools/profiler/lul/platform-linux-lul.h rename : tools/profiler/GeckoProfiler.h => tools/profiler/public/GeckoProfiler.h rename : tools/profiler/GeckoProfilerFunc.h => tools/profiler/public/GeckoProfilerFunc.h rename : tools/profiler/GeckoProfilerImpl.h => tools/profiler/public/GeckoProfilerImpl.h rename : tools/profiler/ProfileGatherer.h => tools/profiler/public/ProfileGatherer.h rename : tools/profiler/ProfilerBacktrace.h => tools/profiler/public/ProfilerBacktrace.h rename : tools/profiler/ProfilerMarkers.h => tools/profiler/public/ProfilerMarkers.h rename : tools/profiler/PseudoStack.h => tools/profiler/public/PseudoStack.h rename : tools/profiler/shared-libraries.h => tools/profiler/public/shared-libraries.h rename : tools/profiler/GeckoTaskTracer.cpp => tools/profiler/tasktracer/GeckoTaskTracer.cpp rename : tools/profiler/GeckoTaskTracer.h => tools/profiler/tasktracer/GeckoTaskTracer.h rename : tools/profiler/GeckoTaskTracerImpl.h => tools/profiler/tasktracer/GeckoTaskTracerImpl.h rename : tools/profiler/SourceEventTypeMap.h => tools/profiler/tasktracer/SourceEventTypeMap.h rename : tools/profiler/TracedTaskCommon.cpp => tools/profiler/tasktracer/TracedTaskCommon.cpp rename : tools/profiler/TracedTaskCommon.h => tools/profiler/tasktracer/TracedTaskCommon.h extra : commitid : EGgqHIgsN6z
2015-06-30 22:03:45 +03:00
// A fixed-capacity circular buffer.
// This class is used as a queue of entries which, after construction, never
// allocates. This makes it safe to use in the profiler's "critical section".
// Entries are appended at the end. Once the queue capacity has been reached,
// adding a new entry will evict an old entry from the start of the queue.
// Positions in the queue are represented as 64-bit unsigned integers which
// only increase and never wrap around.
// mRangeStart and mRangeEnd describe the range in that uint64_t space which is
// covered by the queue contents.
// Internally, the buffer uses a fixed-size storage and applies a modulo
// operation when accessing entries in that storage buffer. "Evicting" an entry
// really just means that an existing entry in the storage buffer gets
// overwritten and that mRangeStart gets incremented.
class ProfileBuffer final
{
Bug 1178892 - Split the profiler into Core & Gecko files and break apart monolithic headers. r=mstange --HG-- rename : tools/profiler/EHABIStackWalk.cpp => tools/profiler/core/EHABIStackWalk.cpp rename : tools/profiler/EHABIStackWalk.h => tools/profiler/core/EHABIStackWalk.h rename : tools/profiler/TableTicker.cpp => tools/profiler/core/GeckoSampler.cpp rename : tools/profiler/TableTicker.h => tools/profiler/core/GeckoSampler.h rename : tools/profiler/IntelPowerGadget.cpp => tools/profiler/core/IntelPowerGadget.cpp rename : tools/profiler/IntelPowerGadget.h => tools/profiler/core/IntelPowerGadget.h rename : tools/profiler/PlatformMacros.h => tools/profiler/core/PlatformMacros.h rename : tools/profiler/ProfileEntry.cpp => tools/profiler/core/ProfileEntry.cpp rename : tools/profiler/ProfileEntry.h => tools/profiler/core/ProfileEntry.h rename : tools/profiler/ProfileJSONWriter.cpp => tools/profiler/core/ProfileJSONWriter.cpp rename : tools/profiler/ProfileJSONWriter.h => tools/profiler/core/ProfileJSONWriter.h rename : tools/profiler/ProfilerBacktrace.cpp => tools/profiler/core/ProfilerBacktrace.cpp rename : tools/profiler/ProfilerMarkers.cpp => tools/profiler/core/ProfilerMarkers.cpp rename : tools/profiler/SyncProfile.cpp => tools/profiler/core/SyncProfile.cpp rename : tools/profiler/SyncProfile.h => tools/profiler/core/SyncProfile.h rename : tools/profiler/platform-linux.cc => tools/profiler/core/platform-linux.cc rename : tools/profiler/platform-macos.cc => tools/profiler/core/platform-macos.cc rename : tools/profiler/platform-win32.cc => tools/profiler/core/platform-win32.cc rename : tools/profiler/platform.cpp => tools/profiler/core/platform.cpp rename : tools/profiler/platform.h => tools/profiler/core/platform.h rename : tools/profiler/shared-libraries-linux.cc => tools/profiler/core/shared-libraries-linux.cc rename : tools/profiler/shared-libraries-macos.cc => tools/profiler/core/shared-libraries-macos.cc rename : tools/profiler/shared-libraries-win32.cc => tools/profiler/core/shared-libraries-win32.cc rename : tools/profiler/shim_mac_dump_syms.h => tools/profiler/core/shim_mac_dump_syms.h rename : tools/profiler/shim_mac_dump_syms.mm => tools/profiler/core/shim_mac_dump_syms.mm rename : tools/profiler/v8-support.h => tools/profiler/core/v8-support.h rename : tools/profiler/ProfileGatherer.cpp => tools/profiler/gecko/ProfileGatherer.cpp rename : tools/profiler/Profiler.jsm => tools/profiler/gecko/Profiler.jsm rename : tools/profiler/ProfilerIOInterposeObserver.cpp => tools/profiler/gecko/ProfilerIOInterposeObserver.cpp rename : tools/profiler/ProfilerIOInterposeObserver.h => tools/profiler/gecko/ProfilerIOInterposeObserver.h rename : tools/profiler/SaveProfileTask.cpp => tools/profiler/gecko/SaveProfileTask.cpp rename : tools/profiler/SaveProfileTask.h => tools/profiler/gecko/SaveProfileTask.h rename : tools/profiler/ThreadResponsiveness.cpp => tools/profiler/gecko/ThreadResponsiveness.cpp rename : tools/profiler/ThreadResponsiveness.h => tools/profiler/gecko/ThreadResponsiveness.h rename : tools/profiler/local_debug_info_symbolizer.cc => tools/profiler/gecko/local_debug_info_symbolizer.cc rename : tools/profiler/local_debug_info_symbolizer.h => tools/profiler/gecko/local_debug_info_symbolizer.h rename : tools/profiler/nsIProfileSaveEvent.idl => tools/profiler/gecko/nsIProfileSaveEvent.idl rename : tools/profiler/nsIProfiler.idl => tools/profiler/gecko/nsIProfiler.idl rename : tools/profiler/nsProfiler.cpp => tools/profiler/gecko/nsProfiler.cpp rename : tools/profiler/nsProfiler.h => tools/profiler/gecko/nsProfiler.h rename : tools/profiler/nsProfilerCIID.h => tools/profiler/gecko/nsProfilerCIID.h rename : tools/profiler/nsProfilerFactory.cpp => tools/profiler/gecko/nsProfilerFactory.cpp rename : tools/profiler/nsProfilerStartParams.cpp => tools/profiler/gecko/nsProfilerStartParams.cpp rename : tools/profiler/nsProfilerStartParams.h => tools/profiler/gecko/nsProfilerStartParams.h rename : tools/profiler/AutoObjectMapper.cpp => tools/profiler/lul/AutoObjectMapper.cpp rename : tools/profiler/AutoObjectMapper.h => tools/profiler/lul/AutoObjectMapper.h rename : tools/profiler/LulCommon.cpp => tools/profiler/lul/LulCommon.cpp rename : tools/profiler/LulCommonExt.h => tools/profiler/lul/LulCommonExt.h rename : tools/profiler/LulDwarf.cpp => tools/profiler/lul/LulDwarf.cpp rename : tools/profiler/LulDwarfExt.h => tools/profiler/lul/LulDwarfExt.h rename : tools/profiler/LulDwarfInt.h => tools/profiler/lul/LulDwarfInt.h rename : tools/profiler/LulDwarfSummariser.cpp => tools/profiler/lul/LulDwarfSummariser.cpp rename : tools/profiler/LulDwarfSummariser.h => tools/profiler/lul/LulDwarfSummariser.h rename : tools/profiler/LulElf.cpp => tools/profiler/lul/LulElf.cpp rename : tools/profiler/LulElfExt.h => tools/profiler/lul/LulElfExt.h rename : tools/profiler/LulElfInt.h => tools/profiler/lul/LulElfInt.h rename : tools/profiler/LulMain.cpp => tools/profiler/lul/LulMain.cpp rename : tools/profiler/LulMain.h => tools/profiler/lul/LulMain.h rename : tools/profiler/LulMainInt.h => tools/profiler/lul/LulMainInt.h rename : tools/profiler/LulPlatformMacros.h => tools/profiler/lul/LulPlatformMacros.h rename : tools/profiler/platform-linux-lul.cpp => tools/profiler/lul/platform-linux-lul.cpp rename : tools/profiler/platform-linux-lul.h => tools/profiler/lul/platform-linux-lul.h rename : tools/profiler/GeckoProfiler.h => tools/profiler/public/GeckoProfiler.h rename : tools/profiler/GeckoProfilerFunc.h => tools/profiler/public/GeckoProfilerFunc.h rename : tools/profiler/GeckoProfilerImpl.h => tools/profiler/public/GeckoProfilerImpl.h rename : tools/profiler/ProfileGatherer.h => tools/profiler/public/ProfileGatherer.h rename : tools/profiler/ProfilerBacktrace.h => tools/profiler/public/ProfilerBacktrace.h rename : tools/profiler/ProfilerMarkers.h => tools/profiler/public/ProfilerMarkers.h rename : tools/profiler/PseudoStack.h => tools/profiler/public/PseudoStack.h rename : tools/profiler/shared-libraries.h => tools/profiler/public/shared-libraries.h rename : tools/profiler/GeckoTaskTracer.cpp => tools/profiler/tasktracer/GeckoTaskTracer.cpp rename : tools/profiler/GeckoTaskTracer.h => tools/profiler/tasktracer/GeckoTaskTracer.h rename : tools/profiler/GeckoTaskTracerImpl.h => tools/profiler/tasktracer/GeckoTaskTracerImpl.h rename : tools/profiler/SourceEventTypeMap.h => tools/profiler/tasktracer/SourceEventTypeMap.h rename : tools/profiler/TracedTaskCommon.cpp => tools/profiler/tasktracer/TracedTaskCommon.cpp rename : tools/profiler/TracedTaskCommon.h => tools/profiler/tasktracer/TracedTaskCommon.h extra : commitid : EGgqHIgsN6z
2015-06-30 22:03:45 +03:00
public:
// ProfileBuffer constructor
// @param aEntrySize The minimum capacity of the buffer. The actual buffer
// capacity will be rounded up to the next power of two.
explicit ProfileBuffer(uint32_t aEntrySize);
Bug 1178892 - Split the profiler into Core & Gecko files and break apart monolithic headers. r=mstange --HG-- rename : tools/profiler/EHABIStackWalk.cpp => tools/profiler/core/EHABIStackWalk.cpp rename : tools/profiler/EHABIStackWalk.h => tools/profiler/core/EHABIStackWalk.h rename : tools/profiler/TableTicker.cpp => tools/profiler/core/GeckoSampler.cpp rename : tools/profiler/TableTicker.h => tools/profiler/core/GeckoSampler.h rename : tools/profiler/IntelPowerGadget.cpp => tools/profiler/core/IntelPowerGadget.cpp rename : tools/profiler/IntelPowerGadget.h => tools/profiler/core/IntelPowerGadget.h rename : tools/profiler/PlatformMacros.h => tools/profiler/core/PlatformMacros.h rename : tools/profiler/ProfileEntry.cpp => tools/profiler/core/ProfileEntry.cpp rename : tools/profiler/ProfileEntry.h => tools/profiler/core/ProfileEntry.h rename : tools/profiler/ProfileJSONWriter.cpp => tools/profiler/core/ProfileJSONWriter.cpp rename : tools/profiler/ProfileJSONWriter.h => tools/profiler/core/ProfileJSONWriter.h rename : tools/profiler/ProfilerBacktrace.cpp => tools/profiler/core/ProfilerBacktrace.cpp rename : tools/profiler/ProfilerMarkers.cpp => tools/profiler/core/ProfilerMarkers.cpp rename : tools/profiler/SyncProfile.cpp => tools/profiler/core/SyncProfile.cpp rename : tools/profiler/SyncProfile.h => tools/profiler/core/SyncProfile.h rename : tools/profiler/platform-linux.cc => tools/profiler/core/platform-linux.cc rename : tools/profiler/platform-macos.cc => tools/profiler/core/platform-macos.cc rename : tools/profiler/platform-win32.cc => tools/profiler/core/platform-win32.cc rename : tools/profiler/platform.cpp => tools/profiler/core/platform.cpp rename : tools/profiler/platform.h => tools/profiler/core/platform.h rename : tools/profiler/shared-libraries-linux.cc => tools/profiler/core/shared-libraries-linux.cc rename : tools/profiler/shared-libraries-macos.cc => tools/profiler/core/shared-libraries-macos.cc rename : tools/profiler/shared-libraries-win32.cc => tools/profiler/core/shared-libraries-win32.cc rename : tools/profiler/shim_mac_dump_syms.h => tools/profiler/core/shim_mac_dump_syms.h rename : tools/profiler/shim_mac_dump_syms.mm => tools/profiler/core/shim_mac_dump_syms.mm rename : tools/profiler/v8-support.h => tools/profiler/core/v8-support.h rename : tools/profiler/ProfileGatherer.cpp => tools/profiler/gecko/ProfileGatherer.cpp rename : tools/profiler/Profiler.jsm => tools/profiler/gecko/Profiler.jsm rename : tools/profiler/ProfilerIOInterposeObserver.cpp => tools/profiler/gecko/ProfilerIOInterposeObserver.cpp rename : tools/profiler/ProfilerIOInterposeObserver.h => tools/profiler/gecko/ProfilerIOInterposeObserver.h rename : tools/profiler/SaveProfileTask.cpp => tools/profiler/gecko/SaveProfileTask.cpp rename : tools/profiler/SaveProfileTask.h => tools/profiler/gecko/SaveProfileTask.h rename : tools/profiler/ThreadResponsiveness.cpp => tools/profiler/gecko/ThreadResponsiveness.cpp rename : tools/profiler/ThreadResponsiveness.h => tools/profiler/gecko/ThreadResponsiveness.h rename : tools/profiler/local_debug_info_symbolizer.cc => tools/profiler/gecko/local_debug_info_symbolizer.cc rename : tools/profiler/local_debug_info_symbolizer.h => tools/profiler/gecko/local_debug_info_symbolizer.h rename : tools/profiler/nsIProfileSaveEvent.idl => tools/profiler/gecko/nsIProfileSaveEvent.idl rename : tools/profiler/nsIProfiler.idl => tools/profiler/gecko/nsIProfiler.idl rename : tools/profiler/nsProfiler.cpp => tools/profiler/gecko/nsProfiler.cpp rename : tools/profiler/nsProfiler.h => tools/profiler/gecko/nsProfiler.h rename : tools/profiler/nsProfilerCIID.h => tools/profiler/gecko/nsProfilerCIID.h rename : tools/profiler/nsProfilerFactory.cpp => tools/profiler/gecko/nsProfilerFactory.cpp rename : tools/profiler/nsProfilerStartParams.cpp => tools/profiler/gecko/nsProfilerStartParams.cpp rename : tools/profiler/nsProfilerStartParams.h => tools/profiler/gecko/nsProfilerStartParams.h rename : tools/profiler/AutoObjectMapper.cpp => tools/profiler/lul/AutoObjectMapper.cpp rename : tools/profiler/AutoObjectMapper.h => tools/profiler/lul/AutoObjectMapper.h rename : tools/profiler/LulCommon.cpp => tools/profiler/lul/LulCommon.cpp rename : tools/profiler/LulCommonExt.h => tools/profiler/lul/LulCommonExt.h rename : tools/profiler/LulDwarf.cpp => tools/profiler/lul/LulDwarf.cpp rename : tools/profiler/LulDwarfExt.h => tools/profiler/lul/LulDwarfExt.h rename : tools/profiler/LulDwarfInt.h => tools/profiler/lul/LulDwarfInt.h rename : tools/profiler/LulDwarfSummariser.cpp => tools/profiler/lul/LulDwarfSummariser.cpp rename : tools/profiler/LulDwarfSummariser.h => tools/profiler/lul/LulDwarfSummariser.h rename : tools/profiler/LulElf.cpp => tools/profiler/lul/LulElf.cpp rename : tools/profiler/LulElfExt.h => tools/profiler/lul/LulElfExt.h rename : tools/profiler/LulElfInt.h => tools/profiler/lul/LulElfInt.h rename : tools/profiler/LulMain.cpp => tools/profiler/lul/LulMain.cpp rename : tools/profiler/LulMain.h => tools/profiler/lul/LulMain.h rename : tools/profiler/LulMainInt.h => tools/profiler/lul/LulMainInt.h rename : tools/profiler/LulPlatformMacros.h => tools/profiler/lul/LulPlatformMacros.h rename : tools/profiler/platform-linux-lul.cpp => tools/profiler/lul/platform-linux-lul.cpp rename : tools/profiler/platform-linux-lul.h => tools/profiler/lul/platform-linux-lul.h rename : tools/profiler/GeckoProfiler.h => tools/profiler/public/GeckoProfiler.h rename : tools/profiler/GeckoProfilerFunc.h => tools/profiler/public/GeckoProfilerFunc.h rename : tools/profiler/GeckoProfilerImpl.h => tools/profiler/public/GeckoProfilerImpl.h rename : tools/profiler/ProfileGatherer.h => tools/profiler/public/ProfileGatherer.h rename : tools/profiler/ProfilerBacktrace.h => tools/profiler/public/ProfilerBacktrace.h rename : tools/profiler/ProfilerMarkers.h => tools/profiler/public/ProfilerMarkers.h rename : tools/profiler/PseudoStack.h => tools/profiler/public/PseudoStack.h rename : tools/profiler/shared-libraries.h => tools/profiler/public/shared-libraries.h rename : tools/profiler/GeckoTaskTracer.cpp => tools/profiler/tasktracer/GeckoTaskTracer.cpp rename : tools/profiler/GeckoTaskTracer.h => tools/profiler/tasktracer/GeckoTaskTracer.h rename : tools/profiler/GeckoTaskTracerImpl.h => tools/profiler/tasktracer/GeckoTaskTracerImpl.h rename : tools/profiler/SourceEventTypeMap.h => tools/profiler/tasktracer/SourceEventTypeMap.h rename : tools/profiler/TracedTaskCommon.cpp => tools/profiler/tasktracer/TracedTaskCommon.cpp rename : tools/profiler/TracedTaskCommon.h => tools/profiler/tasktracer/TracedTaskCommon.h extra : commitid : EGgqHIgsN6z
2015-06-30 22:03:45 +03:00
~ProfileBuffer();
Bug 1178892 - Split the profiler into Core & Gecko files and break apart monolithic headers. r=mstange --HG-- rename : tools/profiler/EHABIStackWalk.cpp => tools/profiler/core/EHABIStackWalk.cpp rename : tools/profiler/EHABIStackWalk.h => tools/profiler/core/EHABIStackWalk.h rename : tools/profiler/TableTicker.cpp => tools/profiler/core/GeckoSampler.cpp rename : tools/profiler/TableTicker.h => tools/profiler/core/GeckoSampler.h rename : tools/profiler/IntelPowerGadget.cpp => tools/profiler/core/IntelPowerGadget.cpp rename : tools/profiler/IntelPowerGadget.h => tools/profiler/core/IntelPowerGadget.h rename : tools/profiler/PlatformMacros.h => tools/profiler/core/PlatformMacros.h rename : tools/profiler/ProfileEntry.cpp => tools/profiler/core/ProfileEntry.cpp rename : tools/profiler/ProfileEntry.h => tools/profiler/core/ProfileEntry.h rename : tools/profiler/ProfileJSONWriter.cpp => tools/profiler/core/ProfileJSONWriter.cpp rename : tools/profiler/ProfileJSONWriter.h => tools/profiler/core/ProfileJSONWriter.h rename : tools/profiler/ProfilerBacktrace.cpp => tools/profiler/core/ProfilerBacktrace.cpp rename : tools/profiler/ProfilerMarkers.cpp => tools/profiler/core/ProfilerMarkers.cpp rename : tools/profiler/SyncProfile.cpp => tools/profiler/core/SyncProfile.cpp rename : tools/profiler/SyncProfile.h => tools/profiler/core/SyncProfile.h rename : tools/profiler/platform-linux.cc => tools/profiler/core/platform-linux.cc rename : tools/profiler/platform-macos.cc => tools/profiler/core/platform-macos.cc rename : tools/profiler/platform-win32.cc => tools/profiler/core/platform-win32.cc rename : tools/profiler/platform.cpp => tools/profiler/core/platform.cpp rename : tools/profiler/platform.h => tools/profiler/core/platform.h rename : tools/profiler/shared-libraries-linux.cc => tools/profiler/core/shared-libraries-linux.cc rename : tools/profiler/shared-libraries-macos.cc => tools/profiler/core/shared-libraries-macos.cc rename : tools/profiler/shared-libraries-win32.cc => tools/profiler/core/shared-libraries-win32.cc rename : tools/profiler/shim_mac_dump_syms.h => tools/profiler/core/shim_mac_dump_syms.h rename : tools/profiler/shim_mac_dump_syms.mm => tools/profiler/core/shim_mac_dump_syms.mm rename : tools/profiler/v8-support.h => tools/profiler/core/v8-support.h rename : tools/profiler/ProfileGatherer.cpp => tools/profiler/gecko/ProfileGatherer.cpp rename : tools/profiler/Profiler.jsm => tools/profiler/gecko/Profiler.jsm rename : tools/profiler/ProfilerIOInterposeObserver.cpp => tools/profiler/gecko/ProfilerIOInterposeObserver.cpp rename : tools/profiler/ProfilerIOInterposeObserver.h => tools/profiler/gecko/ProfilerIOInterposeObserver.h rename : tools/profiler/SaveProfileTask.cpp => tools/profiler/gecko/SaveProfileTask.cpp rename : tools/profiler/SaveProfileTask.h => tools/profiler/gecko/SaveProfileTask.h rename : tools/profiler/ThreadResponsiveness.cpp => tools/profiler/gecko/ThreadResponsiveness.cpp rename : tools/profiler/ThreadResponsiveness.h => tools/profiler/gecko/ThreadResponsiveness.h rename : tools/profiler/local_debug_info_symbolizer.cc => tools/profiler/gecko/local_debug_info_symbolizer.cc rename : tools/profiler/local_debug_info_symbolizer.h => tools/profiler/gecko/local_debug_info_symbolizer.h rename : tools/profiler/nsIProfileSaveEvent.idl => tools/profiler/gecko/nsIProfileSaveEvent.idl rename : tools/profiler/nsIProfiler.idl => tools/profiler/gecko/nsIProfiler.idl rename : tools/profiler/nsProfiler.cpp => tools/profiler/gecko/nsProfiler.cpp rename : tools/profiler/nsProfiler.h => tools/profiler/gecko/nsProfiler.h rename : tools/profiler/nsProfilerCIID.h => tools/profiler/gecko/nsProfilerCIID.h rename : tools/profiler/nsProfilerFactory.cpp => tools/profiler/gecko/nsProfilerFactory.cpp rename : tools/profiler/nsProfilerStartParams.cpp => tools/profiler/gecko/nsProfilerStartParams.cpp rename : tools/profiler/nsProfilerStartParams.h => tools/profiler/gecko/nsProfilerStartParams.h rename : tools/profiler/AutoObjectMapper.cpp => tools/profiler/lul/AutoObjectMapper.cpp rename : tools/profiler/AutoObjectMapper.h => tools/profiler/lul/AutoObjectMapper.h rename : tools/profiler/LulCommon.cpp => tools/profiler/lul/LulCommon.cpp rename : tools/profiler/LulCommonExt.h => tools/profiler/lul/LulCommonExt.h rename : tools/profiler/LulDwarf.cpp => tools/profiler/lul/LulDwarf.cpp rename : tools/profiler/LulDwarfExt.h => tools/profiler/lul/LulDwarfExt.h rename : tools/profiler/LulDwarfInt.h => tools/profiler/lul/LulDwarfInt.h rename : tools/profiler/LulDwarfSummariser.cpp => tools/profiler/lul/LulDwarfSummariser.cpp rename : tools/profiler/LulDwarfSummariser.h => tools/profiler/lul/LulDwarfSummariser.h rename : tools/profiler/LulElf.cpp => tools/profiler/lul/LulElf.cpp rename : tools/profiler/LulElfExt.h => tools/profiler/lul/LulElfExt.h rename : tools/profiler/LulElfInt.h => tools/profiler/lul/LulElfInt.h rename : tools/profiler/LulMain.cpp => tools/profiler/lul/LulMain.cpp rename : tools/profiler/LulMain.h => tools/profiler/lul/LulMain.h rename : tools/profiler/LulMainInt.h => tools/profiler/lul/LulMainInt.h rename : tools/profiler/LulPlatformMacros.h => tools/profiler/lul/LulPlatformMacros.h rename : tools/profiler/platform-linux-lul.cpp => tools/profiler/lul/platform-linux-lul.cpp rename : tools/profiler/platform-linux-lul.h => tools/profiler/lul/platform-linux-lul.h rename : tools/profiler/GeckoProfiler.h => tools/profiler/public/GeckoProfiler.h rename : tools/profiler/GeckoProfilerFunc.h => tools/profiler/public/GeckoProfilerFunc.h rename : tools/profiler/GeckoProfilerImpl.h => tools/profiler/public/GeckoProfilerImpl.h rename : tools/profiler/ProfileGatherer.h => tools/profiler/public/ProfileGatherer.h rename : tools/profiler/ProfilerBacktrace.h => tools/profiler/public/ProfilerBacktrace.h rename : tools/profiler/ProfilerMarkers.h => tools/profiler/public/ProfilerMarkers.h rename : tools/profiler/PseudoStack.h => tools/profiler/public/PseudoStack.h rename : tools/profiler/shared-libraries.h => tools/profiler/public/shared-libraries.h rename : tools/profiler/GeckoTaskTracer.cpp => tools/profiler/tasktracer/GeckoTaskTracer.cpp rename : tools/profiler/GeckoTaskTracer.h => tools/profiler/tasktracer/GeckoTaskTracer.h rename : tools/profiler/GeckoTaskTracerImpl.h => tools/profiler/tasktracer/GeckoTaskTracerImpl.h rename : tools/profiler/SourceEventTypeMap.h => tools/profiler/tasktracer/SourceEventTypeMap.h rename : tools/profiler/TracedTaskCommon.cpp => tools/profiler/tasktracer/TracedTaskCommon.cpp rename : tools/profiler/TracedTaskCommon.h => tools/profiler/tasktracer/TracedTaskCommon.h extra : commitid : EGgqHIgsN6z
2015-06-30 22:03:45 +03:00
// Add |aEntry| to the buffer, ignoring what kind of entry it is.
void AddEntry(const ProfileBufferEntry& aEntry);
// Add to the buffer a sample start (ThreadId) entry for aThreadId.
// Returns the position of the entry.
uint64_t AddThreadIdEntry(int aThreadId);
void CollectCodeLocation(
const char* aLabel, const char* aStr, int aLineNumber,
const mozilla::Maybe<js::ProfileEntry::Category>& aCategory);
Bug 1379933 (part 2) - Improve ProfileBuffer's handling of labels and dynamic strings. r=mstange. When a sample with a label and a dynamic string is written to the ProfileBuffer, the profiler currently joins them together (up to a max length of 512, omitting any that exceed this) and then writes a CodeLocation entry with an empty string followed by a sequence of EmbeddedString entries. When parsing those entries, we allow a length up to 8192, but that limit is never reached due to the prior limit of 512. This patch makes the following changes. - Removes the joining at write time. Labels and dynamic strings are now written separately into the ProfileBuffer. The 512 limit still applies, but just for dynamic strings; dynamic strings longer than that are replaced with "(too long)". (Labels also always take up one entry, because they only require a single pointer, because they are always static strings.) The joining is now done when the ProfileBuffer is parsed, and the max length for the joined string is still 512; any strings exceeding 512 at that point are truncated, rather than omitted. (This also happens to be outside the profier's critical section.) - Renames CodeLocation as Label and EmbeddedString as DynamicStringFragment. This makes the ProfileBuffer entry names better match the names used in GeckoProfiler.h. - Moves AddDynamicCodeLocation(), now called addDynamicStringEntry(), into ProfileBuffer. - Adds some testing of long and overly-long dynamic strings to the GTest. --HG-- extra : rebase_source : 38bdf6e84fa19576c9e0291249e84b19dbb421f7
2017-07-13 04:05:27 +03:00
// Maximum size of a frameKey string that we'll handle.
static const size_t kMaxFrameKeyLength = 512;
// Add JIT frame information to aJITFrameInfo for any JitReturnAddr entries
// that are currently in the buffer at or after aRangeStart, in samples
// for the given thread.
void AddJITInfoForRange(uint64_t aRangeStart,
int aThreadId, JSContext* aContext,
JITFrameInfo& aJITFrameInfo) const;
Bug 1429904 - When a JSContext for a thread is about to go away, collect enough information about any JIT entries in the buffer so that the entire buffer can be streamed to JSON. r=njn This changeset changes behavior. If the profile is streamed before any JSContext has gone away, we now iterate over the entire buffer twice (per thread): First, to collect information about JIT frames, and then again when we build the JSON for the samples. The first traversal stores small pieces of JSON for JIT fromes in individual strings, and the second iteration splices those strings into the thread JSON's frame table. When the JSContext for a thread goes away, we no longer build JSON for samples, and we don't reset the profiler buffer. We now only build the JSON for JIT frames. Once the complete profile is requested and we build samples for it, we iterate over the entire buffer, and look up the cached JIT frame information for JitReturnAddr entries from the correct range. Different parts of the buffer may correspond to the life time of different JSContexts: For each JSContext we will have one range in the JITFrameInfo, and we can look up the correct range based on the buffer position of the JitReturnAddr entry that we're processing. This new way of doing things has multiple advantages: - We no longer reset the buffer, so we no longer lose information about other threads. - All threads from a given process now always have sample data for the same time range. Before this change, the "partial profile" from a thread that lost its JSContext could extend further into the past than the other threads' profiles. - Requesting profiles multiple times now has more consistent results. Before this change, the first requested profile would include the partial profile, but then the partial profile was discarded. And the second requested profile would not contain any data for the time before the JSContext went away. - We now do less work when a thread's JSContext goes away. This should decrease the interruption time. MozReview-Commit-ID: 3KhnPtBijna --HG-- extra : rebase_source : 2ef5ac933e4db1c98526a2b36147ff031893de9e extra : intermediate-source : d63b04327077d1ef55f509b365cd2693905b0733 extra : source : f2d8c993aa2c16bc491c55179d545f5a2c727391
2018-02-28 08:17:16 +03:00
// Stream JSON for samples in the buffer to aWriter, using the supplied
// UniqueStacks object.
// Only streams samples for the given thread ID and which were taken at or
// after aSinceTime.
// aUniqueStacks needs to contain information about any JIT frames that we
// might encounter in the buffer, before this method is called. In other
// words, you need to have called AddJITInfoForRange for every range that
// might contain JIT frame information before calling this method.
void StreamSamplesToJSON(SpliceableJSONWriter& aWriter, int aThreadId,
double aSinceTime,
UniqueStacks& aUniqueStacks) const;
Bug 1429904 - When a JSContext for a thread is about to go away, collect enough information about any JIT entries in the buffer so that the entire buffer can be streamed to JSON. r=njn This changeset changes behavior. If the profile is streamed before any JSContext has gone away, we now iterate over the entire buffer twice (per thread): First, to collect information about JIT frames, and then again when we build the JSON for the samples. The first traversal stores small pieces of JSON for JIT fromes in individual strings, and the second iteration splices those strings into the thread JSON's frame table. When the JSContext for a thread goes away, we no longer build JSON for samples, and we don't reset the profiler buffer. We now only build the JSON for JIT frames. Once the complete profile is requested and we build samples for it, we iterate over the entire buffer, and look up the cached JIT frame information for JitReturnAddr entries from the correct range. Different parts of the buffer may correspond to the life time of different JSContexts: For each JSContext we will have one range in the JITFrameInfo, and we can look up the correct range based on the buffer position of the JitReturnAddr entry that we're processing. This new way of doing things has multiple advantages: - We no longer reset the buffer, so we no longer lose information about other threads. - All threads from a given process now always have sample data for the same time range. Before this change, the "partial profile" from a thread that lost its JSContext could extend further into the past than the other threads' profiles. - Requesting profiles multiple times now has more consistent results. Before this change, the first requested profile would include the partial profile, but then the partial profile was discarded. And the second requested profile would not contain any data for the time before the JSContext went away. - We now do less work when a thread's JSContext goes away. This should decrease the interruption time. MozReview-Commit-ID: 3KhnPtBijna --HG-- extra : rebase_source : 2ef5ac933e4db1c98526a2b36147ff031893de9e extra : intermediate-source : d63b04327077d1ef55f509b365cd2693905b0733 extra : source : f2d8c993aa2c16bc491c55179d545f5a2c727391
2018-02-28 08:17:16 +03:00
void StreamMarkersToJSON(SpliceableJSONWriter& aWriter, int aThreadId,
const mozilla::TimeStamp& aProcessStartTime,
double aSinceTime,
UniqueStacks& aUniqueStacks) const;
void StreamPausedRangesToJSON(SpliceableJSONWriter& aWriter,
double aSinceTime) const;
// Find (via |aLastSample|) the most recent sample for the thread denoted by
// |aThreadId| and clone it, patching in the current time as appropriate.
// Mutate |aLastSample| to point to the newly inserted sample.
// Returns whether duplication was successful.
bool DuplicateLastSample(int aThreadId,
const mozilla::TimeStamp& aProcessStartTime,
mozilla::Maybe<uint64_t>& aLastSample);
Bug 1178892 - Split the profiler into Core & Gecko files and break apart monolithic headers. r=mstange --HG-- rename : tools/profiler/EHABIStackWalk.cpp => tools/profiler/core/EHABIStackWalk.cpp rename : tools/profiler/EHABIStackWalk.h => tools/profiler/core/EHABIStackWalk.h rename : tools/profiler/TableTicker.cpp => tools/profiler/core/GeckoSampler.cpp rename : tools/profiler/TableTicker.h => tools/profiler/core/GeckoSampler.h rename : tools/profiler/IntelPowerGadget.cpp => tools/profiler/core/IntelPowerGadget.cpp rename : tools/profiler/IntelPowerGadget.h => tools/profiler/core/IntelPowerGadget.h rename : tools/profiler/PlatformMacros.h => tools/profiler/core/PlatformMacros.h rename : tools/profiler/ProfileEntry.cpp => tools/profiler/core/ProfileEntry.cpp rename : tools/profiler/ProfileEntry.h => tools/profiler/core/ProfileEntry.h rename : tools/profiler/ProfileJSONWriter.cpp => tools/profiler/core/ProfileJSONWriter.cpp rename : tools/profiler/ProfileJSONWriter.h => tools/profiler/core/ProfileJSONWriter.h rename : tools/profiler/ProfilerBacktrace.cpp => tools/profiler/core/ProfilerBacktrace.cpp rename : tools/profiler/ProfilerMarkers.cpp => tools/profiler/core/ProfilerMarkers.cpp rename : tools/profiler/SyncProfile.cpp => tools/profiler/core/SyncProfile.cpp rename : tools/profiler/SyncProfile.h => tools/profiler/core/SyncProfile.h rename : tools/profiler/platform-linux.cc => tools/profiler/core/platform-linux.cc rename : tools/profiler/platform-macos.cc => tools/profiler/core/platform-macos.cc rename : tools/profiler/platform-win32.cc => tools/profiler/core/platform-win32.cc rename : tools/profiler/platform.cpp => tools/profiler/core/platform.cpp rename : tools/profiler/platform.h => tools/profiler/core/platform.h rename : tools/profiler/shared-libraries-linux.cc => tools/profiler/core/shared-libraries-linux.cc rename : tools/profiler/shared-libraries-macos.cc => tools/profiler/core/shared-libraries-macos.cc rename : tools/profiler/shared-libraries-win32.cc => tools/profiler/core/shared-libraries-win32.cc rename : tools/profiler/shim_mac_dump_syms.h => tools/profiler/core/shim_mac_dump_syms.h rename : tools/profiler/shim_mac_dump_syms.mm => tools/profiler/core/shim_mac_dump_syms.mm rename : tools/profiler/v8-support.h => tools/profiler/core/v8-support.h rename : tools/profiler/ProfileGatherer.cpp => tools/profiler/gecko/ProfileGatherer.cpp rename : tools/profiler/Profiler.jsm => tools/profiler/gecko/Profiler.jsm rename : tools/profiler/ProfilerIOInterposeObserver.cpp => tools/profiler/gecko/ProfilerIOInterposeObserver.cpp rename : tools/profiler/ProfilerIOInterposeObserver.h => tools/profiler/gecko/ProfilerIOInterposeObserver.h rename : tools/profiler/SaveProfileTask.cpp => tools/profiler/gecko/SaveProfileTask.cpp rename : tools/profiler/SaveProfileTask.h => tools/profiler/gecko/SaveProfileTask.h rename : tools/profiler/ThreadResponsiveness.cpp => tools/profiler/gecko/ThreadResponsiveness.cpp rename : tools/profiler/ThreadResponsiveness.h => tools/profiler/gecko/ThreadResponsiveness.h rename : tools/profiler/local_debug_info_symbolizer.cc => tools/profiler/gecko/local_debug_info_symbolizer.cc rename : tools/profiler/local_debug_info_symbolizer.h => tools/profiler/gecko/local_debug_info_symbolizer.h rename : tools/profiler/nsIProfileSaveEvent.idl => tools/profiler/gecko/nsIProfileSaveEvent.idl rename : tools/profiler/nsIProfiler.idl => tools/profiler/gecko/nsIProfiler.idl rename : tools/profiler/nsProfiler.cpp => tools/profiler/gecko/nsProfiler.cpp rename : tools/profiler/nsProfiler.h => tools/profiler/gecko/nsProfiler.h rename : tools/profiler/nsProfilerCIID.h => tools/profiler/gecko/nsProfilerCIID.h rename : tools/profiler/nsProfilerFactory.cpp => tools/profiler/gecko/nsProfilerFactory.cpp rename : tools/profiler/nsProfilerStartParams.cpp => tools/profiler/gecko/nsProfilerStartParams.cpp rename : tools/profiler/nsProfilerStartParams.h => tools/profiler/gecko/nsProfilerStartParams.h rename : tools/profiler/AutoObjectMapper.cpp => tools/profiler/lul/AutoObjectMapper.cpp rename : tools/profiler/AutoObjectMapper.h => tools/profiler/lul/AutoObjectMapper.h rename : tools/profiler/LulCommon.cpp => tools/profiler/lul/LulCommon.cpp rename : tools/profiler/LulCommonExt.h => tools/profiler/lul/LulCommonExt.h rename : tools/profiler/LulDwarf.cpp => tools/profiler/lul/LulDwarf.cpp rename : tools/profiler/LulDwarfExt.h => tools/profiler/lul/LulDwarfExt.h rename : tools/profiler/LulDwarfInt.h => tools/profiler/lul/LulDwarfInt.h rename : tools/profiler/LulDwarfSummariser.cpp => tools/profiler/lul/LulDwarfSummariser.cpp rename : tools/profiler/LulDwarfSummariser.h => tools/profiler/lul/LulDwarfSummariser.h rename : tools/profiler/LulElf.cpp => tools/profiler/lul/LulElf.cpp rename : tools/profiler/LulElfExt.h => tools/profiler/lul/LulElfExt.h rename : tools/profiler/LulElfInt.h => tools/profiler/lul/LulElfInt.h rename : tools/profiler/LulMain.cpp => tools/profiler/lul/LulMain.cpp rename : tools/profiler/LulMain.h => tools/profiler/lul/LulMain.h rename : tools/profiler/LulMainInt.h => tools/profiler/lul/LulMainInt.h rename : tools/profiler/LulPlatformMacros.h => tools/profiler/lul/LulPlatformMacros.h rename : tools/profiler/platform-linux-lul.cpp => tools/profiler/lul/platform-linux-lul.cpp rename : tools/profiler/platform-linux-lul.h => tools/profiler/lul/platform-linux-lul.h rename : tools/profiler/GeckoProfiler.h => tools/profiler/public/GeckoProfiler.h rename : tools/profiler/GeckoProfilerFunc.h => tools/profiler/public/GeckoProfilerFunc.h rename : tools/profiler/GeckoProfilerImpl.h => tools/profiler/public/GeckoProfilerImpl.h rename : tools/profiler/ProfileGatherer.h => tools/profiler/public/ProfileGatherer.h rename : tools/profiler/ProfilerBacktrace.h => tools/profiler/public/ProfilerBacktrace.h rename : tools/profiler/ProfilerMarkers.h => tools/profiler/public/ProfilerMarkers.h rename : tools/profiler/PseudoStack.h => tools/profiler/public/PseudoStack.h rename : tools/profiler/shared-libraries.h => tools/profiler/public/shared-libraries.h rename : tools/profiler/GeckoTaskTracer.cpp => tools/profiler/tasktracer/GeckoTaskTracer.cpp rename : tools/profiler/GeckoTaskTracer.h => tools/profiler/tasktracer/GeckoTaskTracer.h rename : tools/profiler/GeckoTaskTracerImpl.h => tools/profiler/tasktracer/GeckoTaskTracerImpl.h rename : tools/profiler/SourceEventTypeMap.h => tools/profiler/tasktracer/SourceEventTypeMap.h rename : tools/profiler/TracedTaskCommon.cpp => tools/profiler/tasktracer/TracedTaskCommon.cpp rename : tools/profiler/TracedTaskCommon.h => tools/profiler/tasktracer/TracedTaskCommon.h extra : commitid : EGgqHIgsN6z
2015-06-30 22:03:45 +03:00
void AddStoredMarker(ProfilerMarker* aStoredMarker);
Bug 1178892 - Split the profiler into Core & Gecko files and break apart monolithic headers. r=mstange --HG-- rename : tools/profiler/EHABIStackWalk.cpp => tools/profiler/core/EHABIStackWalk.cpp rename : tools/profiler/EHABIStackWalk.h => tools/profiler/core/EHABIStackWalk.h rename : tools/profiler/TableTicker.cpp => tools/profiler/core/GeckoSampler.cpp rename : tools/profiler/TableTicker.h => tools/profiler/core/GeckoSampler.h rename : tools/profiler/IntelPowerGadget.cpp => tools/profiler/core/IntelPowerGadget.cpp rename : tools/profiler/IntelPowerGadget.h => tools/profiler/core/IntelPowerGadget.h rename : tools/profiler/PlatformMacros.h => tools/profiler/core/PlatformMacros.h rename : tools/profiler/ProfileEntry.cpp => tools/profiler/core/ProfileEntry.cpp rename : tools/profiler/ProfileEntry.h => tools/profiler/core/ProfileEntry.h rename : tools/profiler/ProfileJSONWriter.cpp => tools/profiler/core/ProfileJSONWriter.cpp rename : tools/profiler/ProfileJSONWriter.h => tools/profiler/core/ProfileJSONWriter.h rename : tools/profiler/ProfilerBacktrace.cpp => tools/profiler/core/ProfilerBacktrace.cpp rename : tools/profiler/ProfilerMarkers.cpp => tools/profiler/core/ProfilerMarkers.cpp rename : tools/profiler/SyncProfile.cpp => tools/profiler/core/SyncProfile.cpp rename : tools/profiler/SyncProfile.h => tools/profiler/core/SyncProfile.h rename : tools/profiler/platform-linux.cc => tools/profiler/core/platform-linux.cc rename : tools/profiler/platform-macos.cc => tools/profiler/core/platform-macos.cc rename : tools/profiler/platform-win32.cc => tools/profiler/core/platform-win32.cc rename : tools/profiler/platform.cpp => tools/profiler/core/platform.cpp rename : tools/profiler/platform.h => tools/profiler/core/platform.h rename : tools/profiler/shared-libraries-linux.cc => tools/profiler/core/shared-libraries-linux.cc rename : tools/profiler/shared-libraries-macos.cc => tools/profiler/core/shared-libraries-macos.cc rename : tools/profiler/shared-libraries-win32.cc => tools/profiler/core/shared-libraries-win32.cc rename : tools/profiler/shim_mac_dump_syms.h => tools/profiler/core/shim_mac_dump_syms.h rename : tools/profiler/shim_mac_dump_syms.mm => tools/profiler/core/shim_mac_dump_syms.mm rename : tools/profiler/v8-support.h => tools/profiler/core/v8-support.h rename : tools/profiler/ProfileGatherer.cpp => tools/profiler/gecko/ProfileGatherer.cpp rename : tools/profiler/Profiler.jsm => tools/profiler/gecko/Profiler.jsm rename : tools/profiler/ProfilerIOInterposeObserver.cpp => tools/profiler/gecko/ProfilerIOInterposeObserver.cpp rename : tools/profiler/ProfilerIOInterposeObserver.h => tools/profiler/gecko/ProfilerIOInterposeObserver.h rename : tools/profiler/SaveProfileTask.cpp => tools/profiler/gecko/SaveProfileTask.cpp rename : tools/profiler/SaveProfileTask.h => tools/profiler/gecko/SaveProfileTask.h rename : tools/profiler/ThreadResponsiveness.cpp => tools/profiler/gecko/ThreadResponsiveness.cpp rename : tools/profiler/ThreadResponsiveness.h => tools/profiler/gecko/ThreadResponsiveness.h rename : tools/profiler/local_debug_info_symbolizer.cc => tools/profiler/gecko/local_debug_info_symbolizer.cc rename : tools/profiler/local_debug_info_symbolizer.h => tools/profiler/gecko/local_debug_info_symbolizer.h rename : tools/profiler/nsIProfileSaveEvent.idl => tools/profiler/gecko/nsIProfileSaveEvent.idl rename : tools/profiler/nsIProfiler.idl => tools/profiler/gecko/nsIProfiler.idl rename : tools/profiler/nsProfiler.cpp => tools/profiler/gecko/nsProfiler.cpp rename : tools/profiler/nsProfiler.h => tools/profiler/gecko/nsProfiler.h rename : tools/profiler/nsProfilerCIID.h => tools/profiler/gecko/nsProfilerCIID.h rename : tools/profiler/nsProfilerFactory.cpp => tools/profiler/gecko/nsProfilerFactory.cpp rename : tools/profiler/nsProfilerStartParams.cpp => tools/profiler/gecko/nsProfilerStartParams.cpp rename : tools/profiler/nsProfilerStartParams.h => tools/profiler/gecko/nsProfilerStartParams.h rename : tools/profiler/AutoObjectMapper.cpp => tools/profiler/lul/AutoObjectMapper.cpp rename : tools/profiler/AutoObjectMapper.h => tools/profiler/lul/AutoObjectMapper.h rename : tools/profiler/LulCommon.cpp => tools/profiler/lul/LulCommon.cpp rename : tools/profiler/LulCommonExt.h => tools/profiler/lul/LulCommonExt.h rename : tools/profiler/LulDwarf.cpp => tools/profiler/lul/LulDwarf.cpp rename : tools/profiler/LulDwarfExt.h => tools/profiler/lul/LulDwarfExt.h rename : tools/profiler/LulDwarfInt.h => tools/profiler/lul/LulDwarfInt.h rename : tools/profiler/LulDwarfSummariser.cpp => tools/profiler/lul/LulDwarfSummariser.cpp rename : tools/profiler/LulDwarfSummariser.h => tools/profiler/lul/LulDwarfSummariser.h rename : tools/profiler/LulElf.cpp => tools/profiler/lul/LulElf.cpp rename : tools/profiler/LulElfExt.h => tools/profiler/lul/LulElfExt.h rename : tools/profiler/LulElfInt.h => tools/profiler/lul/LulElfInt.h rename : tools/profiler/LulMain.cpp => tools/profiler/lul/LulMain.cpp rename : tools/profiler/LulMain.h => tools/profiler/lul/LulMain.h rename : tools/profiler/LulMainInt.h => tools/profiler/lul/LulMainInt.h rename : tools/profiler/LulPlatformMacros.h => tools/profiler/lul/LulPlatformMacros.h rename : tools/profiler/platform-linux-lul.cpp => tools/profiler/lul/platform-linux-lul.cpp rename : tools/profiler/platform-linux-lul.h => tools/profiler/lul/platform-linux-lul.h rename : tools/profiler/GeckoProfiler.h => tools/profiler/public/GeckoProfiler.h rename : tools/profiler/GeckoProfilerFunc.h => tools/profiler/public/GeckoProfilerFunc.h rename : tools/profiler/GeckoProfilerImpl.h => tools/profiler/public/GeckoProfilerImpl.h rename : tools/profiler/ProfileGatherer.h => tools/profiler/public/ProfileGatherer.h rename : tools/profiler/ProfilerBacktrace.h => tools/profiler/public/ProfilerBacktrace.h rename : tools/profiler/ProfilerMarkers.h => tools/profiler/public/ProfilerMarkers.h rename : tools/profiler/PseudoStack.h => tools/profiler/public/PseudoStack.h rename : tools/profiler/shared-libraries.h => tools/profiler/public/shared-libraries.h rename : tools/profiler/GeckoTaskTracer.cpp => tools/profiler/tasktracer/GeckoTaskTracer.cpp rename : tools/profiler/GeckoTaskTracer.h => tools/profiler/tasktracer/GeckoTaskTracer.h rename : tools/profiler/GeckoTaskTracerImpl.h => tools/profiler/tasktracer/GeckoTaskTracerImpl.h rename : tools/profiler/SourceEventTypeMap.h => tools/profiler/tasktracer/SourceEventTypeMap.h rename : tools/profiler/TracedTaskCommon.cpp => tools/profiler/tasktracer/TracedTaskCommon.cpp rename : tools/profiler/TracedTaskCommon.h => tools/profiler/tasktracer/TracedTaskCommon.h extra : commitid : EGgqHIgsN6z
2015-06-30 22:03:45 +03:00
// The following method is not signal safe!
void DeleteExpiredStoredMarkers();
Bug 1178892 - Split the profiler into Core & Gecko files and break apart monolithic headers. r=mstange --HG-- rename : tools/profiler/EHABIStackWalk.cpp => tools/profiler/core/EHABIStackWalk.cpp rename : tools/profiler/EHABIStackWalk.h => tools/profiler/core/EHABIStackWalk.h rename : tools/profiler/TableTicker.cpp => tools/profiler/core/GeckoSampler.cpp rename : tools/profiler/TableTicker.h => tools/profiler/core/GeckoSampler.h rename : tools/profiler/IntelPowerGadget.cpp => tools/profiler/core/IntelPowerGadget.cpp rename : tools/profiler/IntelPowerGadget.h => tools/profiler/core/IntelPowerGadget.h rename : tools/profiler/PlatformMacros.h => tools/profiler/core/PlatformMacros.h rename : tools/profiler/ProfileEntry.cpp => tools/profiler/core/ProfileEntry.cpp rename : tools/profiler/ProfileEntry.h => tools/profiler/core/ProfileEntry.h rename : tools/profiler/ProfileJSONWriter.cpp => tools/profiler/core/ProfileJSONWriter.cpp rename : tools/profiler/ProfileJSONWriter.h => tools/profiler/core/ProfileJSONWriter.h rename : tools/profiler/ProfilerBacktrace.cpp => tools/profiler/core/ProfilerBacktrace.cpp rename : tools/profiler/ProfilerMarkers.cpp => tools/profiler/core/ProfilerMarkers.cpp rename : tools/profiler/SyncProfile.cpp => tools/profiler/core/SyncProfile.cpp rename : tools/profiler/SyncProfile.h => tools/profiler/core/SyncProfile.h rename : tools/profiler/platform-linux.cc => tools/profiler/core/platform-linux.cc rename : tools/profiler/platform-macos.cc => tools/profiler/core/platform-macos.cc rename : tools/profiler/platform-win32.cc => tools/profiler/core/platform-win32.cc rename : tools/profiler/platform.cpp => tools/profiler/core/platform.cpp rename : tools/profiler/platform.h => tools/profiler/core/platform.h rename : tools/profiler/shared-libraries-linux.cc => tools/profiler/core/shared-libraries-linux.cc rename : tools/profiler/shared-libraries-macos.cc => tools/profiler/core/shared-libraries-macos.cc rename : tools/profiler/shared-libraries-win32.cc => tools/profiler/core/shared-libraries-win32.cc rename : tools/profiler/shim_mac_dump_syms.h => tools/profiler/core/shim_mac_dump_syms.h rename : tools/profiler/shim_mac_dump_syms.mm => tools/profiler/core/shim_mac_dump_syms.mm rename : tools/profiler/v8-support.h => tools/profiler/core/v8-support.h rename : tools/profiler/ProfileGatherer.cpp => tools/profiler/gecko/ProfileGatherer.cpp rename : tools/profiler/Profiler.jsm => tools/profiler/gecko/Profiler.jsm rename : tools/profiler/ProfilerIOInterposeObserver.cpp => tools/profiler/gecko/ProfilerIOInterposeObserver.cpp rename : tools/profiler/ProfilerIOInterposeObserver.h => tools/profiler/gecko/ProfilerIOInterposeObserver.h rename : tools/profiler/SaveProfileTask.cpp => tools/profiler/gecko/SaveProfileTask.cpp rename : tools/profiler/SaveProfileTask.h => tools/profiler/gecko/SaveProfileTask.h rename : tools/profiler/ThreadResponsiveness.cpp => tools/profiler/gecko/ThreadResponsiveness.cpp rename : tools/profiler/ThreadResponsiveness.h => tools/profiler/gecko/ThreadResponsiveness.h rename : tools/profiler/local_debug_info_symbolizer.cc => tools/profiler/gecko/local_debug_info_symbolizer.cc rename : tools/profiler/local_debug_info_symbolizer.h => tools/profiler/gecko/local_debug_info_symbolizer.h rename : tools/profiler/nsIProfileSaveEvent.idl => tools/profiler/gecko/nsIProfileSaveEvent.idl rename : tools/profiler/nsIProfiler.idl => tools/profiler/gecko/nsIProfiler.idl rename : tools/profiler/nsProfiler.cpp => tools/profiler/gecko/nsProfiler.cpp rename : tools/profiler/nsProfiler.h => tools/profiler/gecko/nsProfiler.h rename : tools/profiler/nsProfilerCIID.h => tools/profiler/gecko/nsProfilerCIID.h rename : tools/profiler/nsProfilerFactory.cpp => tools/profiler/gecko/nsProfilerFactory.cpp rename : tools/profiler/nsProfilerStartParams.cpp => tools/profiler/gecko/nsProfilerStartParams.cpp rename : tools/profiler/nsProfilerStartParams.h => tools/profiler/gecko/nsProfilerStartParams.h rename : tools/profiler/AutoObjectMapper.cpp => tools/profiler/lul/AutoObjectMapper.cpp rename : tools/profiler/AutoObjectMapper.h => tools/profiler/lul/AutoObjectMapper.h rename : tools/profiler/LulCommon.cpp => tools/profiler/lul/LulCommon.cpp rename : tools/profiler/LulCommonExt.h => tools/profiler/lul/LulCommonExt.h rename : tools/profiler/LulDwarf.cpp => tools/profiler/lul/LulDwarf.cpp rename : tools/profiler/LulDwarfExt.h => tools/profiler/lul/LulDwarfExt.h rename : tools/profiler/LulDwarfInt.h => tools/profiler/lul/LulDwarfInt.h rename : tools/profiler/LulDwarfSummariser.cpp => tools/profiler/lul/LulDwarfSummariser.cpp rename : tools/profiler/LulDwarfSummariser.h => tools/profiler/lul/LulDwarfSummariser.h rename : tools/profiler/LulElf.cpp => tools/profiler/lul/LulElf.cpp rename : tools/profiler/LulElfExt.h => tools/profiler/lul/LulElfExt.h rename : tools/profiler/LulElfInt.h => tools/profiler/lul/LulElfInt.h rename : tools/profiler/LulMain.cpp => tools/profiler/lul/LulMain.cpp rename : tools/profiler/LulMain.h => tools/profiler/lul/LulMain.h rename : tools/profiler/LulMainInt.h => tools/profiler/lul/LulMainInt.h rename : tools/profiler/LulPlatformMacros.h => tools/profiler/lul/LulPlatformMacros.h rename : tools/profiler/platform-linux-lul.cpp => tools/profiler/lul/platform-linux-lul.cpp rename : tools/profiler/platform-linux-lul.h => tools/profiler/lul/platform-linux-lul.h rename : tools/profiler/GeckoProfiler.h => tools/profiler/public/GeckoProfiler.h rename : tools/profiler/GeckoProfilerFunc.h => tools/profiler/public/GeckoProfilerFunc.h rename : tools/profiler/GeckoProfilerImpl.h => tools/profiler/public/GeckoProfilerImpl.h rename : tools/profiler/ProfileGatherer.h => tools/profiler/public/ProfileGatherer.h rename : tools/profiler/ProfilerBacktrace.h => tools/profiler/public/ProfilerBacktrace.h rename : tools/profiler/ProfilerMarkers.h => tools/profiler/public/ProfilerMarkers.h rename : tools/profiler/PseudoStack.h => tools/profiler/public/PseudoStack.h rename : tools/profiler/shared-libraries.h => tools/profiler/public/shared-libraries.h rename : tools/profiler/GeckoTaskTracer.cpp => tools/profiler/tasktracer/GeckoTaskTracer.cpp rename : tools/profiler/GeckoTaskTracer.h => tools/profiler/tasktracer/GeckoTaskTracer.h rename : tools/profiler/GeckoTaskTracerImpl.h => tools/profiler/tasktracer/GeckoTaskTracerImpl.h rename : tools/profiler/SourceEventTypeMap.h => tools/profiler/tasktracer/SourceEventTypeMap.h rename : tools/profiler/TracedTaskCommon.cpp => tools/profiler/tasktracer/TracedTaskCommon.cpp rename : tools/profiler/TracedTaskCommon.h => tools/profiler/tasktracer/TracedTaskCommon.h extra : commitid : EGgqHIgsN6z
2015-06-30 22:03:45 +03:00
// Access an entry in the buffer.
ProfileBufferEntry& GetEntry(uint64_t aPosition) const
{
return mEntries[aPosition & mEntryIndexMask];
}
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
private:
// The storage that backs our buffer. Holds mEntrySize entries.
// All accesses to entries in mEntries need to go through GetEntry(), which
// translates the given buffer position from the near-infinite uint64_t space
// into the entry storage space.
mozilla::UniquePtr<ProfileBufferEntry[]> mEntries;
Bug 1178892 - Split the profiler into Core & Gecko files and break apart monolithic headers. r=mstange --HG-- rename : tools/profiler/EHABIStackWalk.cpp => tools/profiler/core/EHABIStackWalk.cpp rename : tools/profiler/EHABIStackWalk.h => tools/profiler/core/EHABIStackWalk.h rename : tools/profiler/TableTicker.cpp => tools/profiler/core/GeckoSampler.cpp rename : tools/profiler/TableTicker.h => tools/profiler/core/GeckoSampler.h rename : tools/profiler/IntelPowerGadget.cpp => tools/profiler/core/IntelPowerGadget.cpp rename : tools/profiler/IntelPowerGadget.h => tools/profiler/core/IntelPowerGadget.h rename : tools/profiler/PlatformMacros.h => tools/profiler/core/PlatformMacros.h rename : tools/profiler/ProfileEntry.cpp => tools/profiler/core/ProfileEntry.cpp rename : tools/profiler/ProfileEntry.h => tools/profiler/core/ProfileEntry.h rename : tools/profiler/ProfileJSONWriter.cpp => tools/profiler/core/ProfileJSONWriter.cpp rename : tools/profiler/ProfileJSONWriter.h => tools/profiler/core/ProfileJSONWriter.h rename : tools/profiler/ProfilerBacktrace.cpp => tools/profiler/core/ProfilerBacktrace.cpp rename : tools/profiler/ProfilerMarkers.cpp => tools/profiler/core/ProfilerMarkers.cpp rename : tools/profiler/SyncProfile.cpp => tools/profiler/core/SyncProfile.cpp rename : tools/profiler/SyncProfile.h => tools/profiler/core/SyncProfile.h rename : tools/profiler/platform-linux.cc => tools/profiler/core/platform-linux.cc rename : tools/profiler/platform-macos.cc => tools/profiler/core/platform-macos.cc rename : tools/profiler/platform-win32.cc => tools/profiler/core/platform-win32.cc rename : tools/profiler/platform.cpp => tools/profiler/core/platform.cpp rename : tools/profiler/platform.h => tools/profiler/core/platform.h rename : tools/profiler/shared-libraries-linux.cc => tools/profiler/core/shared-libraries-linux.cc rename : tools/profiler/shared-libraries-macos.cc => tools/profiler/core/shared-libraries-macos.cc rename : tools/profiler/shared-libraries-win32.cc => tools/profiler/core/shared-libraries-win32.cc rename : tools/profiler/shim_mac_dump_syms.h => tools/profiler/core/shim_mac_dump_syms.h rename : tools/profiler/shim_mac_dump_syms.mm => tools/profiler/core/shim_mac_dump_syms.mm rename : tools/profiler/v8-support.h => tools/profiler/core/v8-support.h rename : tools/profiler/ProfileGatherer.cpp => tools/profiler/gecko/ProfileGatherer.cpp rename : tools/profiler/Profiler.jsm => tools/profiler/gecko/Profiler.jsm rename : tools/profiler/ProfilerIOInterposeObserver.cpp => tools/profiler/gecko/ProfilerIOInterposeObserver.cpp rename : tools/profiler/ProfilerIOInterposeObserver.h => tools/profiler/gecko/ProfilerIOInterposeObserver.h rename : tools/profiler/SaveProfileTask.cpp => tools/profiler/gecko/SaveProfileTask.cpp rename : tools/profiler/SaveProfileTask.h => tools/profiler/gecko/SaveProfileTask.h rename : tools/profiler/ThreadResponsiveness.cpp => tools/profiler/gecko/ThreadResponsiveness.cpp rename : tools/profiler/ThreadResponsiveness.h => tools/profiler/gecko/ThreadResponsiveness.h rename : tools/profiler/local_debug_info_symbolizer.cc => tools/profiler/gecko/local_debug_info_symbolizer.cc rename : tools/profiler/local_debug_info_symbolizer.h => tools/profiler/gecko/local_debug_info_symbolizer.h rename : tools/profiler/nsIProfileSaveEvent.idl => tools/profiler/gecko/nsIProfileSaveEvent.idl rename : tools/profiler/nsIProfiler.idl => tools/profiler/gecko/nsIProfiler.idl rename : tools/profiler/nsProfiler.cpp => tools/profiler/gecko/nsProfiler.cpp rename : tools/profiler/nsProfiler.h => tools/profiler/gecko/nsProfiler.h rename : tools/profiler/nsProfilerCIID.h => tools/profiler/gecko/nsProfilerCIID.h rename : tools/profiler/nsProfilerFactory.cpp => tools/profiler/gecko/nsProfilerFactory.cpp rename : tools/profiler/nsProfilerStartParams.cpp => tools/profiler/gecko/nsProfilerStartParams.cpp rename : tools/profiler/nsProfilerStartParams.h => tools/profiler/gecko/nsProfilerStartParams.h rename : tools/profiler/AutoObjectMapper.cpp => tools/profiler/lul/AutoObjectMapper.cpp rename : tools/profiler/AutoObjectMapper.h => tools/profiler/lul/AutoObjectMapper.h rename : tools/profiler/LulCommon.cpp => tools/profiler/lul/LulCommon.cpp rename : tools/profiler/LulCommonExt.h => tools/profiler/lul/LulCommonExt.h rename : tools/profiler/LulDwarf.cpp => tools/profiler/lul/LulDwarf.cpp rename : tools/profiler/LulDwarfExt.h => tools/profiler/lul/LulDwarfExt.h rename : tools/profiler/LulDwarfInt.h => tools/profiler/lul/LulDwarfInt.h rename : tools/profiler/LulDwarfSummariser.cpp => tools/profiler/lul/LulDwarfSummariser.cpp rename : tools/profiler/LulDwarfSummariser.h => tools/profiler/lul/LulDwarfSummariser.h rename : tools/profiler/LulElf.cpp => tools/profiler/lul/LulElf.cpp rename : tools/profiler/LulElfExt.h => tools/profiler/lul/LulElfExt.h rename : tools/profiler/LulElfInt.h => tools/profiler/lul/LulElfInt.h rename : tools/profiler/LulMain.cpp => tools/profiler/lul/LulMain.cpp rename : tools/profiler/LulMain.h => tools/profiler/lul/LulMain.h rename : tools/profiler/LulMainInt.h => tools/profiler/lul/LulMainInt.h rename : tools/profiler/LulPlatformMacros.h => tools/profiler/lul/LulPlatformMacros.h rename : tools/profiler/platform-linux-lul.cpp => tools/profiler/lul/platform-linux-lul.cpp rename : tools/profiler/platform-linux-lul.h => tools/profiler/lul/platform-linux-lul.h rename : tools/profiler/GeckoProfiler.h => tools/profiler/public/GeckoProfiler.h rename : tools/profiler/GeckoProfilerFunc.h => tools/profiler/public/GeckoProfilerFunc.h rename : tools/profiler/GeckoProfilerImpl.h => tools/profiler/public/GeckoProfilerImpl.h rename : tools/profiler/ProfileGatherer.h => tools/profiler/public/ProfileGatherer.h rename : tools/profiler/ProfilerBacktrace.h => tools/profiler/public/ProfilerBacktrace.h rename : tools/profiler/ProfilerMarkers.h => tools/profiler/public/ProfilerMarkers.h rename : tools/profiler/PseudoStack.h => tools/profiler/public/PseudoStack.h rename : tools/profiler/shared-libraries.h => tools/profiler/public/shared-libraries.h rename : tools/profiler/GeckoTaskTracer.cpp => tools/profiler/tasktracer/GeckoTaskTracer.cpp rename : tools/profiler/GeckoTaskTracer.h => tools/profiler/tasktracer/GeckoTaskTracer.h rename : tools/profiler/GeckoTaskTracerImpl.h => tools/profiler/tasktracer/GeckoTaskTracerImpl.h rename : tools/profiler/SourceEventTypeMap.h => tools/profiler/tasktracer/SourceEventTypeMap.h rename : tools/profiler/TracedTaskCommon.cpp => tools/profiler/tasktracer/TracedTaskCommon.cpp rename : tools/profiler/TracedTaskCommon.h => tools/profiler/tasktracer/TracedTaskCommon.h extra : commitid : EGgqHIgsN6z
2015-06-30 22:03:45 +03:00
// A mask such that pos & mEntryIndexMask == pos % mEntrySize.
uint32_t mEntryIndexMask;
Bug 1178892 - Split the profiler into Core & Gecko files and break apart monolithic headers. r=mstange --HG-- rename : tools/profiler/EHABIStackWalk.cpp => tools/profiler/core/EHABIStackWalk.cpp rename : tools/profiler/EHABIStackWalk.h => tools/profiler/core/EHABIStackWalk.h rename : tools/profiler/TableTicker.cpp => tools/profiler/core/GeckoSampler.cpp rename : tools/profiler/TableTicker.h => tools/profiler/core/GeckoSampler.h rename : tools/profiler/IntelPowerGadget.cpp => tools/profiler/core/IntelPowerGadget.cpp rename : tools/profiler/IntelPowerGadget.h => tools/profiler/core/IntelPowerGadget.h rename : tools/profiler/PlatformMacros.h => tools/profiler/core/PlatformMacros.h rename : tools/profiler/ProfileEntry.cpp => tools/profiler/core/ProfileEntry.cpp rename : tools/profiler/ProfileEntry.h => tools/profiler/core/ProfileEntry.h rename : tools/profiler/ProfileJSONWriter.cpp => tools/profiler/core/ProfileJSONWriter.cpp rename : tools/profiler/ProfileJSONWriter.h => tools/profiler/core/ProfileJSONWriter.h rename : tools/profiler/ProfilerBacktrace.cpp => tools/profiler/core/ProfilerBacktrace.cpp rename : tools/profiler/ProfilerMarkers.cpp => tools/profiler/core/ProfilerMarkers.cpp rename : tools/profiler/SyncProfile.cpp => tools/profiler/core/SyncProfile.cpp rename : tools/profiler/SyncProfile.h => tools/profiler/core/SyncProfile.h rename : tools/profiler/platform-linux.cc => tools/profiler/core/platform-linux.cc rename : tools/profiler/platform-macos.cc => tools/profiler/core/platform-macos.cc rename : tools/profiler/platform-win32.cc => tools/profiler/core/platform-win32.cc rename : tools/profiler/platform.cpp => tools/profiler/core/platform.cpp rename : tools/profiler/platform.h => tools/profiler/core/platform.h rename : tools/profiler/shared-libraries-linux.cc => tools/profiler/core/shared-libraries-linux.cc rename : tools/profiler/shared-libraries-macos.cc => tools/profiler/core/shared-libraries-macos.cc rename : tools/profiler/shared-libraries-win32.cc => tools/profiler/core/shared-libraries-win32.cc rename : tools/profiler/shim_mac_dump_syms.h => tools/profiler/core/shim_mac_dump_syms.h rename : tools/profiler/shim_mac_dump_syms.mm => tools/profiler/core/shim_mac_dump_syms.mm rename : tools/profiler/v8-support.h => tools/profiler/core/v8-support.h rename : tools/profiler/ProfileGatherer.cpp => tools/profiler/gecko/ProfileGatherer.cpp rename : tools/profiler/Profiler.jsm => tools/profiler/gecko/Profiler.jsm rename : tools/profiler/ProfilerIOInterposeObserver.cpp => tools/profiler/gecko/ProfilerIOInterposeObserver.cpp rename : tools/profiler/ProfilerIOInterposeObserver.h => tools/profiler/gecko/ProfilerIOInterposeObserver.h rename : tools/profiler/SaveProfileTask.cpp => tools/profiler/gecko/SaveProfileTask.cpp rename : tools/profiler/SaveProfileTask.h => tools/profiler/gecko/SaveProfileTask.h rename : tools/profiler/ThreadResponsiveness.cpp => tools/profiler/gecko/ThreadResponsiveness.cpp rename : tools/profiler/ThreadResponsiveness.h => tools/profiler/gecko/ThreadResponsiveness.h rename : tools/profiler/local_debug_info_symbolizer.cc => tools/profiler/gecko/local_debug_info_symbolizer.cc rename : tools/profiler/local_debug_info_symbolizer.h => tools/profiler/gecko/local_debug_info_symbolizer.h rename : tools/profiler/nsIProfileSaveEvent.idl => tools/profiler/gecko/nsIProfileSaveEvent.idl rename : tools/profiler/nsIProfiler.idl => tools/profiler/gecko/nsIProfiler.idl rename : tools/profiler/nsProfiler.cpp => tools/profiler/gecko/nsProfiler.cpp rename : tools/profiler/nsProfiler.h => tools/profiler/gecko/nsProfiler.h rename : tools/profiler/nsProfilerCIID.h => tools/profiler/gecko/nsProfilerCIID.h rename : tools/profiler/nsProfilerFactory.cpp => tools/profiler/gecko/nsProfilerFactory.cpp rename : tools/profiler/nsProfilerStartParams.cpp => tools/profiler/gecko/nsProfilerStartParams.cpp rename : tools/profiler/nsProfilerStartParams.h => tools/profiler/gecko/nsProfilerStartParams.h rename : tools/profiler/AutoObjectMapper.cpp => tools/profiler/lul/AutoObjectMapper.cpp rename : tools/profiler/AutoObjectMapper.h => tools/profiler/lul/AutoObjectMapper.h rename : tools/profiler/LulCommon.cpp => tools/profiler/lul/LulCommon.cpp rename : tools/profiler/LulCommonExt.h => tools/profiler/lul/LulCommonExt.h rename : tools/profiler/LulDwarf.cpp => tools/profiler/lul/LulDwarf.cpp rename : tools/profiler/LulDwarfExt.h => tools/profiler/lul/LulDwarfExt.h rename : tools/profiler/LulDwarfInt.h => tools/profiler/lul/LulDwarfInt.h rename : tools/profiler/LulDwarfSummariser.cpp => tools/profiler/lul/LulDwarfSummariser.cpp rename : tools/profiler/LulDwarfSummariser.h => tools/profiler/lul/LulDwarfSummariser.h rename : tools/profiler/LulElf.cpp => tools/profiler/lul/LulElf.cpp rename : tools/profiler/LulElfExt.h => tools/profiler/lul/LulElfExt.h rename : tools/profiler/LulElfInt.h => tools/profiler/lul/LulElfInt.h rename : tools/profiler/LulMain.cpp => tools/profiler/lul/LulMain.cpp rename : tools/profiler/LulMain.h => tools/profiler/lul/LulMain.h rename : tools/profiler/LulMainInt.h => tools/profiler/lul/LulMainInt.h rename : tools/profiler/LulPlatformMacros.h => tools/profiler/lul/LulPlatformMacros.h rename : tools/profiler/platform-linux-lul.cpp => tools/profiler/lul/platform-linux-lul.cpp rename : tools/profiler/platform-linux-lul.h => tools/profiler/lul/platform-linux-lul.h rename : tools/profiler/GeckoProfiler.h => tools/profiler/public/GeckoProfiler.h rename : tools/profiler/GeckoProfilerFunc.h => tools/profiler/public/GeckoProfilerFunc.h rename : tools/profiler/GeckoProfilerImpl.h => tools/profiler/public/GeckoProfilerImpl.h rename : tools/profiler/ProfileGatherer.h => tools/profiler/public/ProfileGatherer.h rename : tools/profiler/ProfilerBacktrace.h => tools/profiler/public/ProfilerBacktrace.h rename : tools/profiler/ProfilerMarkers.h => tools/profiler/public/ProfilerMarkers.h rename : tools/profiler/PseudoStack.h => tools/profiler/public/PseudoStack.h rename : tools/profiler/shared-libraries.h => tools/profiler/public/shared-libraries.h rename : tools/profiler/GeckoTaskTracer.cpp => tools/profiler/tasktracer/GeckoTaskTracer.cpp rename : tools/profiler/GeckoTaskTracer.h => tools/profiler/tasktracer/GeckoTaskTracer.h rename : tools/profiler/GeckoTaskTracerImpl.h => tools/profiler/tasktracer/GeckoTaskTracerImpl.h rename : tools/profiler/SourceEventTypeMap.h => tools/profiler/tasktracer/SourceEventTypeMap.h rename : tools/profiler/TracedTaskCommon.cpp => tools/profiler/tasktracer/TracedTaskCommon.cpp rename : tools/profiler/TracedTaskCommon.h => tools/profiler/tasktracer/TracedTaskCommon.h extra : commitid : EGgqHIgsN6z
2015-06-30 22:03:45 +03:00
public:
// mRangeStart and mRangeEnd are uint64_t values that strictly advance and
// never wrap around. mRangeEnd is always greater than or equal to
// mRangeStart, but never gets more than mEntrySize steps ahead of
// mRangeStart, because we can only store a fixed number of entries in the
// buffer. Once the entire buffer is in use, adding a new entry will evict an
// entry from the front of the buffer (and increase mRangeStart).
// In other words, the following conditions hold true at all times:
// (1) mRangeStart <= mRangeEnd
// (2) mRangeEnd - mRangeStart <= mEntrySize
//
// If there are no live entries, then mRangeStart == mRangeEnd.
// Otherwise, mRangeStart is the first live entry and mRangeEnd is one past
// the last live entry, and also the position at which the next entry will be
// added.
// (mRangeEnd - mRangeStart) always gives the number of live entries.
uint64_t mRangeStart;
uint64_t mRangeEnd;
// The number of entries in our buffer. Always a power of two.
uint32_t mEntrySize;
Bug 1178892 - Split the profiler into Core & Gecko files and break apart monolithic headers. r=mstange --HG-- rename : tools/profiler/EHABIStackWalk.cpp => tools/profiler/core/EHABIStackWalk.cpp rename : tools/profiler/EHABIStackWalk.h => tools/profiler/core/EHABIStackWalk.h rename : tools/profiler/TableTicker.cpp => tools/profiler/core/GeckoSampler.cpp rename : tools/profiler/TableTicker.h => tools/profiler/core/GeckoSampler.h rename : tools/profiler/IntelPowerGadget.cpp => tools/profiler/core/IntelPowerGadget.cpp rename : tools/profiler/IntelPowerGadget.h => tools/profiler/core/IntelPowerGadget.h rename : tools/profiler/PlatformMacros.h => tools/profiler/core/PlatformMacros.h rename : tools/profiler/ProfileEntry.cpp => tools/profiler/core/ProfileEntry.cpp rename : tools/profiler/ProfileEntry.h => tools/profiler/core/ProfileEntry.h rename : tools/profiler/ProfileJSONWriter.cpp => tools/profiler/core/ProfileJSONWriter.cpp rename : tools/profiler/ProfileJSONWriter.h => tools/profiler/core/ProfileJSONWriter.h rename : tools/profiler/ProfilerBacktrace.cpp => tools/profiler/core/ProfilerBacktrace.cpp rename : tools/profiler/ProfilerMarkers.cpp => tools/profiler/core/ProfilerMarkers.cpp rename : tools/profiler/SyncProfile.cpp => tools/profiler/core/SyncProfile.cpp rename : tools/profiler/SyncProfile.h => tools/profiler/core/SyncProfile.h rename : tools/profiler/platform-linux.cc => tools/profiler/core/platform-linux.cc rename : tools/profiler/platform-macos.cc => tools/profiler/core/platform-macos.cc rename : tools/profiler/platform-win32.cc => tools/profiler/core/platform-win32.cc rename : tools/profiler/platform.cpp => tools/profiler/core/platform.cpp rename : tools/profiler/platform.h => tools/profiler/core/platform.h rename : tools/profiler/shared-libraries-linux.cc => tools/profiler/core/shared-libraries-linux.cc rename : tools/profiler/shared-libraries-macos.cc => tools/profiler/core/shared-libraries-macos.cc rename : tools/profiler/shared-libraries-win32.cc => tools/profiler/core/shared-libraries-win32.cc rename : tools/profiler/shim_mac_dump_syms.h => tools/profiler/core/shim_mac_dump_syms.h rename : tools/profiler/shim_mac_dump_syms.mm => tools/profiler/core/shim_mac_dump_syms.mm rename : tools/profiler/v8-support.h => tools/profiler/core/v8-support.h rename : tools/profiler/ProfileGatherer.cpp => tools/profiler/gecko/ProfileGatherer.cpp rename : tools/profiler/Profiler.jsm => tools/profiler/gecko/Profiler.jsm rename : tools/profiler/ProfilerIOInterposeObserver.cpp => tools/profiler/gecko/ProfilerIOInterposeObserver.cpp rename : tools/profiler/ProfilerIOInterposeObserver.h => tools/profiler/gecko/ProfilerIOInterposeObserver.h rename : tools/profiler/SaveProfileTask.cpp => tools/profiler/gecko/SaveProfileTask.cpp rename : tools/profiler/SaveProfileTask.h => tools/profiler/gecko/SaveProfileTask.h rename : tools/profiler/ThreadResponsiveness.cpp => tools/profiler/gecko/ThreadResponsiveness.cpp rename : tools/profiler/ThreadResponsiveness.h => tools/profiler/gecko/ThreadResponsiveness.h rename : tools/profiler/local_debug_info_symbolizer.cc => tools/profiler/gecko/local_debug_info_symbolizer.cc rename : tools/profiler/local_debug_info_symbolizer.h => tools/profiler/gecko/local_debug_info_symbolizer.h rename : tools/profiler/nsIProfileSaveEvent.idl => tools/profiler/gecko/nsIProfileSaveEvent.idl rename : tools/profiler/nsIProfiler.idl => tools/profiler/gecko/nsIProfiler.idl rename : tools/profiler/nsProfiler.cpp => tools/profiler/gecko/nsProfiler.cpp rename : tools/profiler/nsProfiler.h => tools/profiler/gecko/nsProfiler.h rename : tools/profiler/nsProfilerCIID.h => tools/profiler/gecko/nsProfilerCIID.h rename : tools/profiler/nsProfilerFactory.cpp => tools/profiler/gecko/nsProfilerFactory.cpp rename : tools/profiler/nsProfilerStartParams.cpp => tools/profiler/gecko/nsProfilerStartParams.cpp rename : tools/profiler/nsProfilerStartParams.h => tools/profiler/gecko/nsProfilerStartParams.h rename : tools/profiler/AutoObjectMapper.cpp => tools/profiler/lul/AutoObjectMapper.cpp rename : tools/profiler/AutoObjectMapper.h => tools/profiler/lul/AutoObjectMapper.h rename : tools/profiler/LulCommon.cpp => tools/profiler/lul/LulCommon.cpp rename : tools/profiler/LulCommonExt.h => tools/profiler/lul/LulCommonExt.h rename : tools/profiler/LulDwarf.cpp => tools/profiler/lul/LulDwarf.cpp rename : tools/profiler/LulDwarfExt.h => tools/profiler/lul/LulDwarfExt.h rename : tools/profiler/LulDwarfInt.h => tools/profiler/lul/LulDwarfInt.h rename : tools/profiler/LulDwarfSummariser.cpp => tools/profiler/lul/LulDwarfSummariser.cpp rename : tools/profiler/LulDwarfSummariser.h => tools/profiler/lul/LulDwarfSummariser.h rename : tools/profiler/LulElf.cpp => tools/profiler/lul/LulElf.cpp rename : tools/profiler/LulElfExt.h => tools/profiler/lul/LulElfExt.h rename : tools/profiler/LulElfInt.h => tools/profiler/lul/LulElfInt.h rename : tools/profiler/LulMain.cpp => tools/profiler/lul/LulMain.cpp rename : tools/profiler/LulMain.h => tools/profiler/lul/LulMain.h rename : tools/profiler/LulMainInt.h => tools/profiler/lul/LulMainInt.h rename : tools/profiler/LulPlatformMacros.h => tools/profiler/lul/LulPlatformMacros.h rename : tools/profiler/platform-linux-lul.cpp => tools/profiler/lul/platform-linux-lul.cpp rename : tools/profiler/platform-linux-lul.h => tools/profiler/lul/platform-linux-lul.h rename : tools/profiler/GeckoProfiler.h => tools/profiler/public/GeckoProfiler.h rename : tools/profiler/GeckoProfilerFunc.h => tools/profiler/public/GeckoProfilerFunc.h rename : tools/profiler/GeckoProfilerImpl.h => tools/profiler/public/GeckoProfilerImpl.h rename : tools/profiler/ProfileGatherer.h => tools/profiler/public/ProfileGatherer.h rename : tools/profiler/ProfilerBacktrace.h => tools/profiler/public/ProfilerBacktrace.h rename : tools/profiler/ProfilerMarkers.h => tools/profiler/public/ProfilerMarkers.h rename : tools/profiler/PseudoStack.h => tools/profiler/public/PseudoStack.h rename : tools/profiler/shared-libraries.h => tools/profiler/public/shared-libraries.h rename : tools/profiler/GeckoTaskTracer.cpp => tools/profiler/tasktracer/GeckoTaskTracer.cpp rename : tools/profiler/GeckoTaskTracer.h => tools/profiler/tasktracer/GeckoTaskTracer.h rename : tools/profiler/GeckoTaskTracerImpl.h => tools/profiler/tasktracer/GeckoTaskTracerImpl.h rename : tools/profiler/SourceEventTypeMap.h => tools/profiler/tasktracer/SourceEventTypeMap.h rename : tools/profiler/TracedTaskCommon.cpp => tools/profiler/tasktracer/TracedTaskCommon.cpp rename : tools/profiler/TracedTaskCommon.h => tools/profiler/tasktracer/TracedTaskCommon.h extra : commitid : EGgqHIgsN6z
2015-06-30 22:03:45 +03:00
// Markers that marker entries in the buffer might refer to.
ProfilerMarkerLinkedList mStoredMarkers;
};
/**
* Helper type used to implement ProfilerStackCollector. This type is used as
* the collector for MergeStacks by ProfileBuffer. It holds a reference to the
* buffer, as well as additional feature flags which are needed to control the
* data collection strategy
*/
class ProfileBufferCollector final : public ProfilerStackCollector
{
public:
ProfileBufferCollector(ProfileBuffer& aBuf, uint32_t aFeatures,
uint64_t aSamplePos)
: mBuf(aBuf)
, mSamplePositionInBuffer(aSamplePos)
, mFeatures(aFeatures)
{}
mozilla::Maybe<uint64_t> SamplePositionInBuffer() override
{
return mozilla::Some(mSamplePositionInBuffer);
}
mozilla::Maybe<uint64_t> BufferRangeStart() override
{
return mozilla::Some(mBuf.mRangeStart);
}
virtual void CollectNativeLeafAddr(void* aAddr) override;
virtual void CollectJitReturnAddr(void* aAddr) override;
virtual void CollectWasmFrame(const char* aLabel) override;
virtual void CollectPseudoEntry(const js::ProfileEntry& aEntry) override;
private:
ProfileBuffer& mBuf;
uint64_t mSamplePositionInBuffer;
uint32_t mFeatures;
};
Bug 1178892 - Split the profiler into Core & Gecko files and break apart monolithic headers. r=mstange --HG-- rename : tools/profiler/EHABIStackWalk.cpp => tools/profiler/core/EHABIStackWalk.cpp rename : tools/profiler/EHABIStackWalk.h => tools/profiler/core/EHABIStackWalk.h rename : tools/profiler/TableTicker.cpp => tools/profiler/core/GeckoSampler.cpp rename : tools/profiler/TableTicker.h => tools/profiler/core/GeckoSampler.h rename : tools/profiler/IntelPowerGadget.cpp => tools/profiler/core/IntelPowerGadget.cpp rename : tools/profiler/IntelPowerGadget.h => tools/profiler/core/IntelPowerGadget.h rename : tools/profiler/PlatformMacros.h => tools/profiler/core/PlatformMacros.h rename : tools/profiler/ProfileEntry.cpp => tools/profiler/core/ProfileEntry.cpp rename : tools/profiler/ProfileEntry.h => tools/profiler/core/ProfileEntry.h rename : tools/profiler/ProfileJSONWriter.cpp => tools/profiler/core/ProfileJSONWriter.cpp rename : tools/profiler/ProfileJSONWriter.h => tools/profiler/core/ProfileJSONWriter.h rename : tools/profiler/ProfilerBacktrace.cpp => tools/profiler/core/ProfilerBacktrace.cpp rename : tools/profiler/ProfilerMarkers.cpp => tools/profiler/core/ProfilerMarkers.cpp rename : tools/profiler/SyncProfile.cpp => tools/profiler/core/SyncProfile.cpp rename : tools/profiler/SyncProfile.h => tools/profiler/core/SyncProfile.h rename : tools/profiler/platform-linux.cc => tools/profiler/core/platform-linux.cc rename : tools/profiler/platform-macos.cc => tools/profiler/core/platform-macos.cc rename : tools/profiler/platform-win32.cc => tools/profiler/core/platform-win32.cc rename : tools/profiler/platform.cpp => tools/profiler/core/platform.cpp rename : tools/profiler/platform.h => tools/profiler/core/platform.h rename : tools/profiler/shared-libraries-linux.cc => tools/profiler/core/shared-libraries-linux.cc rename : tools/profiler/shared-libraries-macos.cc => tools/profiler/core/shared-libraries-macos.cc rename : tools/profiler/shared-libraries-win32.cc => tools/profiler/core/shared-libraries-win32.cc rename : tools/profiler/shim_mac_dump_syms.h => tools/profiler/core/shim_mac_dump_syms.h rename : tools/profiler/shim_mac_dump_syms.mm => tools/profiler/core/shim_mac_dump_syms.mm rename : tools/profiler/v8-support.h => tools/profiler/core/v8-support.h rename : tools/profiler/ProfileGatherer.cpp => tools/profiler/gecko/ProfileGatherer.cpp rename : tools/profiler/Profiler.jsm => tools/profiler/gecko/Profiler.jsm rename : tools/profiler/ProfilerIOInterposeObserver.cpp => tools/profiler/gecko/ProfilerIOInterposeObserver.cpp rename : tools/profiler/ProfilerIOInterposeObserver.h => tools/profiler/gecko/ProfilerIOInterposeObserver.h rename : tools/profiler/SaveProfileTask.cpp => tools/profiler/gecko/SaveProfileTask.cpp rename : tools/profiler/SaveProfileTask.h => tools/profiler/gecko/SaveProfileTask.h rename : tools/profiler/ThreadResponsiveness.cpp => tools/profiler/gecko/ThreadResponsiveness.cpp rename : tools/profiler/ThreadResponsiveness.h => tools/profiler/gecko/ThreadResponsiveness.h rename : tools/profiler/local_debug_info_symbolizer.cc => tools/profiler/gecko/local_debug_info_symbolizer.cc rename : tools/profiler/local_debug_info_symbolizer.h => tools/profiler/gecko/local_debug_info_symbolizer.h rename : tools/profiler/nsIProfileSaveEvent.idl => tools/profiler/gecko/nsIProfileSaveEvent.idl rename : tools/profiler/nsIProfiler.idl => tools/profiler/gecko/nsIProfiler.idl rename : tools/profiler/nsProfiler.cpp => tools/profiler/gecko/nsProfiler.cpp rename : tools/profiler/nsProfiler.h => tools/profiler/gecko/nsProfiler.h rename : tools/profiler/nsProfilerCIID.h => tools/profiler/gecko/nsProfilerCIID.h rename : tools/profiler/nsProfilerFactory.cpp => tools/profiler/gecko/nsProfilerFactory.cpp rename : tools/profiler/nsProfilerStartParams.cpp => tools/profiler/gecko/nsProfilerStartParams.cpp rename : tools/profiler/nsProfilerStartParams.h => tools/profiler/gecko/nsProfilerStartParams.h rename : tools/profiler/AutoObjectMapper.cpp => tools/profiler/lul/AutoObjectMapper.cpp rename : tools/profiler/AutoObjectMapper.h => tools/profiler/lul/AutoObjectMapper.h rename : tools/profiler/LulCommon.cpp => tools/profiler/lul/LulCommon.cpp rename : tools/profiler/LulCommonExt.h => tools/profiler/lul/LulCommonExt.h rename : tools/profiler/LulDwarf.cpp => tools/profiler/lul/LulDwarf.cpp rename : tools/profiler/LulDwarfExt.h => tools/profiler/lul/LulDwarfExt.h rename : tools/profiler/LulDwarfInt.h => tools/profiler/lul/LulDwarfInt.h rename : tools/profiler/LulDwarfSummariser.cpp => tools/profiler/lul/LulDwarfSummariser.cpp rename : tools/profiler/LulDwarfSummariser.h => tools/profiler/lul/LulDwarfSummariser.h rename : tools/profiler/LulElf.cpp => tools/profiler/lul/LulElf.cpp rename : tools/profiler/LulElfExt.h => tools/profiler/lul/LulElfExt.h rename : tools/profiler/LulElfInt.h => tools/profiler/lul/LulElfInt.h rename : tools/profiler/LulMain.cpp => tools/profiler/lul/LulMain.cpp rename : tools/profiler/LulMain.h => tools/profiler/lul/LulMain.h rename : tools/profiler/LulMainInt.h => tools/profiler/lul/LulMainInt.h rename : tools/profiler/LulPlatformMacros.h => tools/profiler/lul/LulPlatformMacros.h rename : tools/profiler/platform-linux-lul.cpp => tools/profiler/lul/platform-linux-lul.cpp rename : tools/profiler/platform-linux-lul.h => tools/profiler/lul/platform-linux-lul.h rename : tools/profiler/GeckoProfiler.h => tools/profiler/public/GeckoProfiler.h rename : tools/profiler/GeckoProfilerFunc.h => tools/profiler/public/GeckoProfilerFunc.h rename : tools/profiler/GeckoProfilerImpl.h => tools/profiler/public/GeckoProfilerImpl.h rename : tools/profiler/ProfileGatherer.h => tools/profiler/public/ProfileGatherer.h rename : tools/profiler/ProfilerBacktrace.h => tools/profiler/public/ProfilerBacktrace.h rename : tools/profiler/ProfilerMarkers.h => tools/profiler/public/ProfilerMarkers.h rename : tools/profiler/PseudoStack.h => tools/profiler/public/PseudoStack.h rename : tools/profiler/shared-libraries.h => tools/profiler/public/shared-libraries.h rename : tools/profiler/GeckoTaskTracer.cpp => tools/profiler/tasktracer/GeckoTaskTracer.cpp rename : tools/profiler/GeckoTaskTracer.h => tools/profiler/tasktracer/GeckoTaskTracer.h rename : tools/profiler/GeckoTaskTracerImpl.h => tools/profiler/tasktracer/GeckoTaskTracerImpl.h rename : tools/profiler/SourceEventTypeMap.h => tools/profiler/tasktracer/SourceEventTypeMap.h rename : tools/profiler/TracedTaskCommon.cpp => tools/profiler/tasktracer/TracedTaskCommon.cpp rename : tools/profiler/TracedTaskCommon.h => tools/profiler/tasktracer/TracedTaskCommon.h extra : commitid : EGgqHIgsN6z
2015-06-30 22:03:45 +03:00
#endif