gecko-dev/ipc/mscom/ProfilerMarkers.h
Aaron Klotz b460ef68c0 Bug 1646453: Add MSCOM channel hook to enable profiler markers for COM IPC; r=Jamie,gerald
To intercept COM IPC, we provide an `IChannelHook` interface to
`CoRegisterChannelHook`, which gives us notifications about COM IPC that we can
use to insert profiler markers. Note that `IChannelHook` is not documented on
MSDN, however it is defined in the SDK header files.

When the profiler is available, once XPCOM is up:

* If the profiler is active, we immediately register the channel hook;
* Otherwise we register an observer and hold off on registering the hook until
  the profiler is started, at which point we register the hook and remove the
  observer.

Differential Revision: https://phabricator.services.mozilla.com/D80053
2020-06-19 00:40:18 +00:00

19 lines
566 B
C++

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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 mozilla_mscom_ProfilerMarkers_h
#define mozilla_mscom_ProfilerMarkers_h
namespace mozilla {
namespace mscom {
void InitProfilerMarkers();
} // namespace mscom
} // namespace mozilla
#endif // mozilla_mscom_ProfilerMarkers_h