Bug 1632750 - New profiler IPDL functions to manage chunks across processes - r=canaltinova

Differential Revision: https://phabricator.services.mozilla.com/D72366
This commit is contained in:
Gerald Squelart 2020-05-08 03:34:55 +00:00
Родитель ddf7f185a4
Коммит 811ee56c78
4 изменённых файлов: 33 добавлений и 0 удалений

Просмотреть файл

@ -23,6 +23,9 @@ child:
async Pause();
async Resume();
async AwaitNextChunkManagerUpdate() returns (ProfileBufferChunkManagerUpdate update);
async DestroyReleasedChunksAtOrBefore(TimeStamp timeStamp);
async GatherProfile() returns (Shmem profile);
async ClearAllPages();

Просмотреть файл

@ -83,6 +83,18 @@ static nsCString CollectProfileOrEmptyString(bool aIsShuttingDown) {
return profileCString;
}
mozilla::ipc::IPCResult ProfilerChild::RecvAwaitNextChunkManagerUpdate(
AwaitNextChunkManagerUpdateResolver&& aResolve) {
// TODO, see following patches.
return IPC_OK();
}
mozilla::ipc::IPCResult ProfilerChild::RecvDestroyReleasedChunksAtOrBefore(
const TimeStamp& aTimeStamp) {
// TODO, see following patches.
return IPC_OK();
}
mozilla::ipc::IPCResult ProfilerChild::RecvGatherProfile(
GatherProfileResolver&& aResolve) {
mozilla::ipc::Shmem shmem;

Просмотреть файл

@ -3,6 +3,8 @@
* 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/. */
using class mozilla::TimeStamp from "mozilla/TimeStamp.h";
namespace mozilla {
struct ProfilerInitParams {
@ -15,4 +17,16 @@ struct ProfilerInitParams {
nsCString[] filters;
};
struct ProfileBufferChunkMetadata {
TimeStamp doneTimeStamp;
uint32_t bufferBytes;
};
struct ProfileBufferChunkManagerUpdate {
uint64_t unreleasedBytes;
uint64_t releasedBytes;
TimeStamp oldestDoneTimeStamp;
ProfileBufferChunkMetadata[] newlyReleasedChunks;
};
} // namespace mozilla

Просмотреть файл

@ -41,6 +41,10 @@ class ProfilerChild final : public PProfilerChild,
mozilla::ipc::IPCResult RecvStop() override;
mozilla::ipc::IPCResult RecvPause() override;
mozilla::ipc::IPCResult RecvResume() override;
mozilla::ipc::IPCResult RecvAwaitNextChunkManagerUpdate(
AwaitNextChunkManagerUpdateResolver&& aResolve) override;
mozilla::ipc::IPCResult RecvDestroyReleasedChunksAtOrBefore(
const TimeStamp& aTimeStamp) override;
mozilla::ipc::IPCResult RecvGatherProfile(
GatherProfileResolver&& aResolve) override;
mozilla::ipc::IPCResult RecvClearAllPages() override;