mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 22:05:44 +00:00
Bug 1429904 - Remove unused arguments and return values. r=njn
MozReview-Commit-ID: 9P0TKavkwgA --HG-- extra : rebase_source : a30467537478805bb0a69bbb016a143555c2dfe8
This commit is contained in:
parent
28d8be3628
commit
9e2d38db17
@ -65,11 +65,11 @@ public:
|
||||
// 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.
|
||||
bool StreamSamplesToJSON(SpliceableJSONWriter& aWriter, int aThreadId,
|
||||
double aSinceTime, JSContext* cx,
|
||||
void StreamSamplesToJSON(SpliceableJSONWriter& aWriter, int aThreadId,
|
||||
double aSinceTime,
|
||||
UniqueStacks& aUniqueStacks) const;
|
||||
|
||||
bool StreamMarkersToJSON(SpliceableJSONWriter& aWriter, int aThreadId,
|
||||
void StreamMarkersToJSON(SpliceableJSONWriter& aWriter, int aThreadId,
|
||||
const mozilla::TimeStamp& aProcessStartTime,
|
||||
double aSinceTime,
|
||||
UniqueStacks& aUniqueStacks) const;
|
||||
|
@ -889,12 +889,9 @@ private:
|
||||
// DynamicStringFragment("a800.bun")
|
||||
// DynamicStringFragment("dle.js:2")
|
||||
// DynamicStringFragment("5)")
|
||||
//
|
||||
// This method returns true if it wrote anything to the writer.
|
||||
bool
|
||||
void
|
||||
ProfileBuffer::StreamSamplesToJSON(SpliceableJSONWriter& aWriter, int aThreadId,
|
||||
double aSinceTime,
|
||||
JSContext* aContext,
|
||||
UniqueStacks& aUniqueStacks) const
|
||||
{
|
||||
UniquePtr<char[]> strbuf = MakeUnique<char[]>(kMaxFrameKeyLength);
|
||||
@ -910,7 +907,6 @@ ProfileBuffer::StreamSamplesToJSON(SpliceableJSONWriter& aWriter, int aThreadId,
|
||||
}
|
||||
|
||||
EntryGetter e(*this);
|
||||
bool haveSamples = false;
|
||||
|
||||
for (;;) {
|
||||
// This block skips entries until we find the start of the next sample.
|
||||
@ -1083,10 +1079,8 @@ ProfileBuffer::StreamSamplesToJSON(SpliceableJSONWriter& aWriter, int aThreadId,
|
||||
}
|
||||
|
||||
WriteSample(aWriter, *aUniqueStacks.mUniqueStrings, sample);
|
||||
haveSamples = true;
|
||||
}
|
||||
|
||||
return haveSamples;
|
||||
#undef ERROR_AND_CONTINUE
|
||||
}
|
||||
|
||||
@ -1133,8 +1127,7 @@ ProfileBuffer::AddJITInfoForRange(uint64_t aRangeStart,
|
||||
});
|
||||
}
|
||||
|
||||
// This method returns true if it wrote anything to the writer.
|
||||
bool
|
||||
void
|
||||
ProfileBuffer::StreamMarkersToJSON(SpliceableJSONWriter& aWriter,
|
||||
int aThreadId,
|
||||
const TimeStamp& aProcessStartTime,
|
||||
@ -1142,7 +1135,6 @@ ProfileBuffer::StreamMarkersToJSON(SpliceableJSONWriter& aWriter,
|
||||
UniqueStacks& aUniqueStacks) const
|
||||
{
|
||||
EntryGetter e(*this);
|
||||
bool haveMarkers = false;
|
||||
|
||||
// Stream all markers whose threadId matches aThreadId. We skip other entries,
|
||||
// because we process them in StreamSamplesToJSON().
|
||||
@ -1156,13 +1148,10 @@ ProfileBuffer::StreamMarkersToJSON(SpliceableJSONWriter& aWriter,
|
||||
if (marker->GetTime() >= aSinceTime &&
|
||||
marker->GetThreadId() == aThreadId) {
|
||||
marker->StreamJSON(aWriter, aProcessStartTime, aUniqueStacks);
|
||||
haveMarkers = true;
|
||||
}
|
||||
}
|
||||
e.Next();
|
||||
}
|
||||
|
||||
return haveMarkers;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -58,10 +58,7 @@ ProfiledThreadData::StreamJSON(const ProfileBuffer& aBuffer, JSContext* aCx,
|
||||
aBuffer, aWriter,
|
||||
aProcessStartTime,
|
||||
mThreadInfo->RegisterTime(), mUnregisterTime,
|
||||
aSinceTime, aCx,
|
||||
nullptr,
|
||||
nullptr,
|
||||
uniqueStacks);
|
||||
aSinceTime, uniqueStacks);
|
||||
|
||||
aWriter.StartObjectProperty("stackTable");
|
||||
{
|
||||
@ -117,9 +114,6 @@ StreamSamplesAndMarkers(const char* aName,
|
||||
const TimeStamp& aRegisterTime,
|
||||
const TimeStamp& aUnregisterTime,
|
||||
double aSinceTime,
|
||||
JSContext* aContext,
|
||||
UniquePtr<char[]>&& aPartialSamplesJSON,
|
||||
UniquePtr<char[]>&& aPartialMarkersJSON,
|
||||
UniqueStacks& aUniqueStacks)
|
||||
{
|
||||
aWriter.StringProperty("processType",
|
||||
@ -156,15 +150,8 @@ StreamSamplesAndMarkers(const char* aName,
|
||||
|
||||
aWriter.StartArrayProperty("data");
|
||||
{
|
||||
if (aPartialSamplesJSON) {
|
||||
// We would only have saved streamed samples during shutdown
|
||||
// streaming, which cares about dumping the entire buffer, and thus
|
||||
// should have passed in 0 for aSinceTime.
|
||||
MOZ_ASSERT(aSinceTime == 0);
|
||||
aWriter.Splice(aPartialSamplesJSON.get());
|
||||
}
|
||||
aBuffer.StreamSamplesToJSON(aWriter, aThreadId, aSinceTime,
|
||||
aContext, aUniqueStacks);
|
||||
aUniqueStacks);
|
||||
}
|
||||
aWriter.EndArray();
|
||||
}
|
||||
@ -181,10 +168,6 @@ StreamSamplesAndMarkers(const char* aName,
|
||||
|
||||
aWriter.StartArrayProperty("data");
|
||||
{
|
||||
if (aPartialMarkersJSON) {
|
||||
MOZ_ASSERT(aSinceTime == 0);
|
||||
aWriter.Splice(aPartialMarkersJSON.get());
|
||||
}
|
||||
aBuffer.StreamMarkersToJSON(aWriter, aThreadId, aProcessStartTime,
|
||||
aSinceTime, aUniqueStacks);
|
||||
}
|
||||
|
@ -129,9 +129,6 @@ StreamSamplesAndMarkers(const char* aName, int aThreadId,
|
||||
const TimeStamp& aRegisterTime,
|
||||
const TimeStamp& aUnregisterTime,
|
||||
double aSinceTime,
|
||||
JSContext* aContext,
|
||||
UniquePtr<char[]>&& aPartialSamplesJSON,
|
||||
UniquePtr<char[]>&& aPartialMarkersJSON,
|
||||
UniqueStacks& aUniqueStacks);
|
||||
|
||||
#endif // ProfiledThreadData_h
|
||||
|
@ -37,8 +37,5 @@ ProfilerBacktrace::StreamJSON(SpliceableJSONWriter& aWriter,
|
||||
/* aRegisterTime */ TimeStamp(),
|
||||
/* aUnregisterTime */ TimeStamp(),
|
||||
/* aSinceTime */ 0,
|
||||
/* aContext */ nullptr,
|
||||
/* aSavedStreamedSamples */ nullptr,
|
||||
/* aSavedStreamedMarkers */ nullptr,
|
||||
aUniqueStacks);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user