<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[204737] trunk/Source/WebKit2</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/204737">204737</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2016-08-22 14:11:17 -0700 (Mon, 22 Aug 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Remove MessageRecorder
https://bugs.webkit.org/show_bug.cgi?id=161022
Reviewed by Tim Horton.
* Platform/IPC/ArgumentCoders.cpp:
(IPC::ArgumentCoder<uuid_t>::encode): Deleted.
(IPC::ArgumentCoder<uuid_t>::decode): Deleted.
* Platform/IPC/ArgumentCoders.h:
* Platform/IPC/Connection.cpp:
(IPC::Connection::sendMessage):
(IPC::Connection::sendSyncMessage):
(IPC::Connection::sendSyncMessageFromSecondaryThread):
(IPC::Connection::dispatchSyncMessage): Deleted.
(IPC::Connection::dispatchMessage): Deleted.
* Platform/IPC/Connection.h:
* Platform/IPC/Encoder.cpp:
(IPC::Encoder::encodeHeader): Deleted.
* Platform/IPC/MessageRecorder.cpp: Removed.
(IPC::MessageRecorder::isEnabled): Deleted.
(IPC::MessageRecorder::recordOutgoingMessage): Deleted.
(IPC::MessageRecorder::recordIncomingMessage): Deleted.
(IPC::MessageRecorder::MessageProcessingToken::MessageProcessingToken): Deleted.
(IPC::MessageRecorder::MessageProcessingToken::~MessageProcessingToken): Deleted.
* Platform/IPC/MessageRecorder.h: Removed.
(IPC::MessageRecorder::MessageRecorder): Deleted.
* Platform/IPC/MessageRecorderProbes.d: Removed.
* WebKit2.xcodeproj/project.pbxproj:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2PlatformIPCArgumentCoderscpp">trunk/Source/WebKit2/Platform/IPC/ArgumentCoders.cpp</a></li>
<li><a href="#trunkSourceWebKit2PlatformIPCArgumentCodersh">trunk/Source/WebKit2/Platform/IPC/ArgumentCoders.h</a></li>
<li><a href="#trunkSourceWebKit2PlatformIPCConnectioncpp">trunk/Source/WebKit2/Platform/IPC/Connection.cpp</a></li>
<li><a href="#trunkSourceWebKit2PlatformIPCConnectionh">trunk/Source/WebKit2/Platform/IPC/Connection.h</a></li>
<li><a href="#trunkSourceWebKit2PlatformIPCEncodercpp">trunk/Source/WebKit2/Platform/IPC/Encoder.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2PlatformIPCMessageRecordercpp">trunk/Source/WebKit2/Platform/IPC/MessageRecorder.cpp</a></li>
<li><a href="#trunkSourceWebKit2PlatformIPCMessageRecorderh">trunk/Source/WebKit2/Platform/IPC/MessageRecorder.h</a></li>
<li><a href="#trunkSourceWebKit2PlatformIPCMessageRecorderProbesd">trunk/Source/WebKit2/Platform/IPC/MessageRecorderProbes.d</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (204736 => 204737)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-08-22 20:28:39 UTC (rev 204736)
+++ trunk/Source/WebKit2/ChangeLog        2016-08-22 21:11:17 UTC (rev 204737)
</span><span class="lines">@@ -1,3 +1,34 @@
</span><ins>+2016-08-19 Anders Carlsson <andersca@apple.com>
+
+ Remove MessageRecorder
+ https://bugs.webkit.org/show_bug.cgi?id=161022
+
+ Reviewed by Tim Horton.
+
+ * Platform/IPC/ArgumentCoders.cpp:
+ (IPC::ArgumentCoder<uuid_t>::encode): Deleted.
+ (IPC::ArgumentCoder<uuid_t>::decode): Deleted.
+ * Platform/IPC/ArgumentCoders.h:
+ * Platform/IPC/Connection.cpp:
+ (IPC::Connection::sendMessage):
+ (IPC::Connection::sendSyncMessage):
+ (IPC::Connection::sendSyncMessageFromSecondaryThread):
+ (IPC::Connection::dispatchSyncMessage): Deleted.
+ (IPC::Connection::dispatchMessage): Deleted.
+ * Platform/IPC/Connection.h:
+ * Platform/IPC/Encoder.cpp:
+ (IPC::Encoder::encodeHeader): Deleted.
+ * Platform/IPC/MessageRecorder.cpp: Removed.
+ (IPC::MessageRecorder::isEnabled): Deleted.
+ (IPC::MessageRecorder::recordOutgoingMessage): Deleted.
+ (IPC::MessageRecorder::recordIncomingMessage): Deleted.
+ (IPC::MessageRecorder::MessageProcessingToken::MessageProcessingToken): Deleted.
+ (IPC::MessageRecorder::MessageProcessingToken::~MessageProcessingToken): Deleted.
+ * Platform/IPC/MessageRecorder.h: Removed.
+ (IPC::MessageRecorder::MessageRecorder): Deleted.
+ * Platform/IPC/MessageRecorderProbes.d: Removed.
+ * WebKit2.xcodeproj/project.pbxproj:
+
</ins><span class="cx"> 2016-08-22 Alex Christensen <achristensen@webkit.org>
</span><span class="cx">
</span><span class="cx"> Fix Mac CMake build after r204717.
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformIPCArgumentCoderscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/IPC/ArgumentCoders.cpp (204736 => 204737)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/IPC/ArgumentCoders.cpp        2016-08-22 20:28:39 UTC (rev 204736)
+++ trunk/Source/WebKit2/Platform/IPC/ArgumentCoders.cpp        2016-08-22 21:11:17 UTC (rev 204737)
</span><span class="lines">@@ -162,16 +162,4 @@
</span><span class="cx"> return decodeStringText<UChar>(decoder, length, result);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#if HAVE(DTRACE)
-void ArgumentCoder<uuid_t>::encode(Encoder& encoder, const uuid_t& uuid)
-{
- SimpleArgumentCoder<uuid_t>::encode(encoder, uuid);
-}
-
-bool ArgumentCoder<uuid_t>::decode(Decoder& decoder, uuid_t& uuid)
-{
- return SimpleArgumentCoder<uuid_t>::decode(decoder, uuid);
-}
-#endif
-
</del><span class="cx"> } // namespace IPC
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformIPCArgumentCodersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/IPC/ArgumentCoders.h (204736 => 204737)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/IPC/ArgumentCoders.h        2016-08-22 20:28:39 UTC (rev 204736)
+++ trunk/Source/WebKit2/Platform/IPC/ArgumentCoders.h        2016-08-22 21:11:17 UTC (rev 204737)
</span><span class="lines">@@ -37,10 +37,6 @@
</span><span class="cx"> #include <wtf/Optional.h>
</span><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx">
</span><del>-#if HAVE(DTRACE)
-#include <uuid/uuid.h>
-#endif
-
</del><span class="cx"> namespace IPC {
</span><span class="cx">
</span><span class="cx"> // An argument coder works on POD types
</span><span class="lines">@@ -362,13 +358,6 @@
</span><span class="cx"> static bool decode(Decoder&, String&);
</span><span class="cx"> };
</span><span class="cx">
</span><del>-#if HAVE(DTRACE)
-template<> struct ArgumentCoder<uuid_t> {
- static void encode(Encoder&, const uuid_t&);
- static bool decode(Decoder&, uuid_t&);
-};
-#endif
-
</del><span class="cx"> } // namespace IPC
</span><span class="cx">
</span><span class="cx"> #endif // ArgumentCoders_h
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformIPCConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/IPC/Connection.cpp (204736 => 204737)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/IPC/Connection.cpp        2016-08-22 20:28:39 UTC (rev 204736)
+++ trunk/Source/WebKit2/Platform/IPC/Connection.cpp        2016-08-22 21:11:17 UTC (rev 204737)
</span><span class="lines">@@ -283,11 +283,7 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#if HAVE(DTRACE)
- auto replyEncoder = std::make_unique<Encoder>("IPC", "SyncMessageReply", syncRequestID, decoder.UUID());
-#else
</del><span class="cx"> auto replyEncoder = std::make_unique<Encoder>("IPC", "SyncMessageReply", syncRequestID);
</span><del>-#endif
</del><span class="cx">
</span><span class="cx"> // Hand off both the decoder and encoder to the work queue message receiver.
</span><span class="cx"> workQueueMessageReceiver.didReceiveSyncMessage(*this, decoder, replyEncoder);
</span><span class="lines">@@ -340,7 +336,7 @@
</span><span class="cx"> return encoder;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool Connection::sendMessage(std::unique_ptr<Encoder> encoder, unsigned messageSendFlags, bool alreadyRecordedMessage)
</del><ins>+bool Connection::sendMessage(std::unique_ptr<Encoder> encoder, unsigned messageSendFlags)
</ins><span class="cx"> {
</span><span class="cx"> if (!isValid())
</span><span class="cx"> return false;
</span><span class="lines">@@ -358,14 +354,6 @@
</span><span class="cx"> || m_inDispatchMessageMarkedDispatchWhenWaitingForSyncReplyCount))
</span><span class="cx"> encoder->setShouldDispatchMessageWhenWaitingForSyncReply(true);
</span><span class="cx">
</span><del>-#if HAVE(DTRACE)
- std::unique_ptr<MessageRecorder::MessageProcessingToken> token;
- if (!alreadyRecordedMessage)
- token = MessageRecorder::recordOutgoingMessage(*this, *encoder);
-#else
- UNUSED_PARAM(alreadyRecordedMessage);
-#endif
-
</del><span class="cx"> {
</span><span class="cx"> std::lock_guard<Lock> lock(m_outgoingMessagesMutex);
</span><span class="cx"> m_outgoingMessages.append(WTFMove(encoder));
</span><span class="lines">@@ -485,12 +473,8 @@
</span><span class="cx">
</span><span class="cx"> ++m_inSendSyncCount;
</span><span class="cx">
</span><del>-#if HAVE(DTRACE)
- auto token = MessageRecorder::recordOutgoingMessage(*this, *encoder);
-#endif
-
</del><span class="cx"> // First send the message.
</span><del>- sendMessage(WTFMove(encoder), DispatchMessageEvenWhenWaitingForSyncReply, true);
</del><ins>+ sendMessage(WTFMove(encoder), DispatchMessageEvenWhenWaitingForSyncReply);
</ins><span class="cx">
</span><span class="cx"> // Then wait for a reply. Waiting for a reply could involve dispatching incoming sync messages, so
</span><span class="cx"> // keep an extra reference to the connection here in case it's invalidated.
</span><span class="lines">@@ -531,12 +515,8 @@
</span><span class="cx"> m_secondaryThreadPendingSyncReplyMap.add(syncRequestID, &pendingReply);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#if HAVE(DTRACE)
- auto token = MessageRecorder::recordOutgoingMessage(*this, *encoder);
-#endif
</del><ins>+ sendMessage(WTFMove(encoder), 0);
</ins><span class="cx">
</span><del>- sendMessage(WTFMove(encoder), 0, true);
-
</del><span class="cx"> timeout = timeoutRespectingIgnoreTimeoutsForTesting(timeout);
</span><span class="cx"> pendingReply.semaphore.wait(currentTime() + (timeout.count() / 1000.0));
</span><span class="cx">
</span><span class="lines">@@ -831,11 +811,7 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#if HAVE(DTRACE)
- auto replyEncoder = std::make_unique<Encoder>("IPC", "SyncMessageReply", syncRequestID, decoder.UUID());
-#else
</del><span class="cx"> auto replyEncoder = std::make_unique<Encoder>("IPC", "SyncMessageReply", syncRequestID);
</span><del>-#endif
</del><span class="cx">
</span><span class="cx"> if (decoder.messageReceiverName() == "IPC" && decoder.messageName() == "WrappedAsyncMessageForTesting") {
</span><span class="cx"> if (!m_fullySynchronousModeIsAllowedForTesting) {
</span><span class="lines">@@ -896,10 +872,6 @@
</span><span class="cx">
</span><span class="cx"> void Connection::dispatchMessage(std::unique_ptr<Decoder> message)
</span><span class="cx"> {
</span><del>-#if HAVE(DTRACE)
- MessageRecorder::recordIncomingMessage(*this, *message);
-#endif
-
</del><span class="cx"> if (!m_client)
</span><span class="cx"> return;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformIPCConnectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/IPC/Connection.h (204736 => 204737)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/IPC/Connection.h        2016-08-22 20:28:39 UTC (rev 204736)
+++ trunk/Source/WebKit2/Platform/IPC/Connection.h        2016-08-22 21:11:17 UTC (rev 204737)
</span><span class="lines">@@ -173,7 +173,7 @@
</span><span class="cx"> template<typename T> bool waitForAndDispatchImmediately(uint64_t destinationID, std::chrono::milliseconds timeout, unsigned waitForMessageFlags = 0);
</span><span class="cx">
</span><span class="cx"> std::unique_ptr<Encoder> createSyncMessageEncoder(StringReference messageReceiverName, StringReference messageName, uint64_t destinationID, uint64_t& syncRequestID);
</span><del>- bool sendMessage(std::unique_ptr<Encoder>, unsigned messageSendFlags = 0, bool alreadyRecordedMessage = false);
</del><ins>+ bool sendMessage(std::unique_ptr<Encoder>, unsigned messageSendFlags = 0);
</ins><span class="cx"> std::unique_ptr<Decoder> sendSyncMessage(uint64_t syncRequestID, std::unique_ptr<Encoder>, std::chrono::milliseconds timeout, unsigned syncSendFlags = 0);
</span><span class="cx"> std::unique_ptr<Decoder> sendSyncMessageFromSecondaryThread(uint64_t syncRequestID, std::unique_ptr<Encoder>, std::chrono::milliseconds timeout);
</span><span class="cx"> bool sendSyncReply(std::unique_ptr<Encoder>);
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformIPCEncodercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/IPC/Encoder.cpp (204736 => 204737)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/IPC/Encoder.cpp        2016-08-22 20:28:39 UTC (rev 204736)
+++ trunk/Source/WebKit2/Platform/IPC/Encoder.cpp        2016-08-22 21:11:17 UTC (rev 204737)
</span><span class="lines">@@ -161,9 +161,6 @@
</span><span class="cx"> *this << m_messageReceiverName;
</span><span class="cx"> *this << m_messageName;
</span><span class="cx"> *this << m_destinationID;
</span><del>-#if HAVE(DTRACE)
- *this << m_UUID;
-#endif
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> uint8_t* Encoder::grow(unsigned alignment, size_t size)
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformIPCMessageRecordercpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/Platform/IPC/MessageRecorder.cpp (204736 => 204737)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/IPC/MessageRecorder.cpp        2016-08-22 20:28:39 UTC (rev 204736)
+++ trunk/Source/WebKit2/Platform/IPC/MessageRecorder.cpp        2016-08-22 21:11:17 UTC (rev 204737)
</span><span class="lines">@@ -1,120 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "MessageRecorder.h"
-
-#if HAVE(DTRACE)
-
-#include "Connection.h"
-#include "Decoder.h"
-#include "Encoder.h"
-#include "MessageRecorderProbes.h"
-#include <wtf/CurrentTime.h>
-
-namespace IPC {
-
-bool MessageRecorder::isEnabled()
-{
- return WEBKITMESSAGERECORDER_MESSAGE_RECEIVED_ENABLED() || WEBKITMESSAGERECORDER_MESSAGE_SENT_ENABLED();
-}
-
-std::unique_ptr<MessageRecorder::MessageProcessingToken> MessageRecorder::recordOutgoingMessage(Connection& connection, Encoder& encoder)
-{
- if (!isEnabled() || !connection.isValid())
- return nullptr;
-
- WebKitMessageRecord record;
- record.sourceProcessType = static_cast<uint64_t>(connection.client()->localProcessType());
- record.destinationProcessType = static_cast<uint64_t>(connection.client()->remoteProcessType());
- record.destinationID = encoder.destinationID();
- record.isSyncMessage = encoder.isSyncMessage();
- record.shouldDispatchMessageWhenWaitingForSyncReply = encoder.shouldDispatchMessageWhenWaitingForSyncReply();
- record.sourceProcessID = getpid();
- record.destinationProcessID = connection.remoteProcessID();
- record.isIncoming = false;
-
- record.messageReceiverName = MallocPtr<char>::malloc(sizeof(char) * (encoder.messageReceiverName().size() + 1));
- strncpy(record.messageReceiverName.get(), encoder.messageReceiverName().data(), encoder.messageReceiverName().size());
- record.messageReceiverName.get()[encoder.messageReceiverName().size()] = 0;
-
- record.messageName = MallocPtr<char>::malloc(sizeof(char) * (encoder.messageName().size() + 1));
- strncpy(record.messageName.get(), encoder.messageName().data(), encoder.messageName().size());
- record.messageName.get()[encoder.messageName().size()] = 0;
-
- uuid_copy(record.UUID, encoder.UUID());
-
- return std::make_unique<MessageProcessingToken>(WTFMove(record));
-}
-
-void MessageRecorder::recordIncomingMessage(Connection& connection, Decoder& decoder)
-{
- if (!isEnabled() || !connection.isValid())
- return;
-
- WebKitMessageRecord record;
- record.sourceProcessType = static_cast<uint64_t>(connection.client()->remoteProcessType());
- record.destinationProcessType = static_cast<uint64_t>(connection.client()->localProcessType());
- record.destinationID = decoder.destinationID();
- record.isSyncMessage = decoder.isSyncMessage();
- record.shouldDispatchMessageWhenWaitingForSyncReply = decoder.shouldDispatchMessageWhenWaitingForSyncReply();
- record.sourceProcessID = connection.remoteProcessID();
- record.destinationProcessID = getpid();
- record.isIncoming = true;
-
- record.messageReceiverName = MallocPtr<char>::malloc(sizeof(char) * (decoder.messageReceiverName().size() + 1));
- strncpy(record.messageReceiverName.get(), decoder.messageReceiverName().data(), decoder.messageReceiverName().size());
- record.messageReceiverName.get()[decoder.messageReceiverName().size()] = 0;
-
- record.messageName = MallocPtr<char>::malloc(sizeof(char) * (decoder.messageName().size() + 1));
- strncpy(record.messageName.get(), decoder.messageName().data(), decoder.messageName().size());
- record.messageName.get()[decoder.messageName().size()] = 0;
-
- uuid_copy(record.UUID, decoder.UUID());
-
- decoder.setMessageProcessingToken(std::make_unique<MessageProcessingToken>(WTFMove(record)));
-}
-
-#pragma mark MessageProcessingToken
-
-MessageRecorder::MessageProcessingToken::MessageProcessingToken(WebKitMessageRecord record)
- : m_record(WTFMove(record))
-{
- m_record.startTime = monotonicallyIncreasingTime();
-}
-
-MessageRecorder::MessageProcessingToken::~MessageProcessingToken()
-{
- m_record.endTime = monotonicallyIncreasingTime();
-
- if (m_record.isIncoming)
- WEBKITMESSAGERECORDER_MESSAGE_RECEIVED(&m_record);
- else
- WEBKITMESSAGERECORDER_MESSAGE_SENT(&m_record);
-}
-
-}
-
-#endif // HAVE(DTRACE)
</del></span></pre></div>
<a id="trunkSourceWebKit2PlatformIPCMessageRecorderh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/Platform/IPC/MessageRecorder.h (204736 => 204737)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/IPC/MessageRecorder.h        2016-08-22 20:28:39 UTC (rev 204736)
+++ trunk/Source/WebKit2/Platform/IPC/MessageRecorder.h        2016-08-22 21:11:17 UTC (rev 204737)
</span><span class="lines">@@ -1,90 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef MessageRecorder_h
-#define MessageRecorder_h
-
-#if HAVE(DTRACE)
-
-#include "ProcessType.h"
-#include <uuid/uuid.h>
-#include <wtf/Forward.h>
-#include <wtf/MallocPtr.h>
-#include <wtf/text/CString.h>
-#include <wtf/text/WTFString.h>
-
-struct WebKitMessageRecord {
- uint8_t sourceProcessType; // IPC::ProcessType
- pid_t sourceProcessID;
-
- uint8_t destinationProcessType; // IPC::ProcessType
- pid_t destinationProcessID;
-
- MallocPtr<char> messageReceiverName;
- MallocPtr<char> messageName;
- uint64_t destinationID;
-
- uuid_t UUID;
-
- double startTime;
- double endTime;
-
- bool isSyncMessage;
- bool shouldDispatchMessageWhenWaitingForSyncReply;
- bool isIncoming;
-};
-
-namespace IPC {
-
-class Connection;
-class Decoder;
-class MessageEncoder;
-
-class MessageRecorder {
-public:
- static bool isEnabled();
-
- class MessageProcessingToken {
- WTF_MAKE_NONCOPYABLE(MessageProcessingToken); WTF_MAKE_FAST_ALLOCATED;
- public:
- explicit MessageProcessingToken(WebKitMessageRecord);
- ~MessageProcessingToken();
-
- private:
- WebKitMessageRecord m_record;
- };
-
- static std::unique_ptr<MessageRecorder::MessageProcessingToken> recordOutgoingMessage(IPC::Connection&, IPC::Encoder&);
- static void recordIncomingMessage(IPC::Connection&, IPC::Decoder&);
-
-private:
- explicit MessageRecorder() { }
-};
-
-};
-
-#endif // HAVE(DTRACE)
-
-#endif // MessageRecorder_h
</del></span></pre></div>
<a id="trunkSourceWebKit2PlatformIPCMessageRecorderProbesd"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/Platform/IPC/MessageRecorderProbes.d (204736 => 204737)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/IPC/MessageRecorderProbes.d        2016-08-22 20:28:39 UTC (rev 204736)
+++ trunk/Source/WebKit2/Platform/IPC/MessageRecorderProbes.d        2016-08-22 21:11:17 UTC (rev 204737)
</span><span class="lines">@@ -1,31 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-struct WebKitMessageRecord;
-
-provider WebKitMessageRecorder {
- probe message_sent(struct WebKitMessageRecord*);
- probe message_received(struct WebKitMessageRecord*);
-};
</del></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (204736 => 204737)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2016-08-22 20:28:39 UTC (rev 204736)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2016-08-22 21:11:17 UTC (rev 204737)
</span><span class="lines">@@ -630,9 +630,6 @@
</span><span class="cx">                 2D50366B1BCDE17900E20BB3 /* NativeWebGestureEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D50366A1BCDE17900E20BB3 /* NativeWebGestureEvent.h */; };
</span><span class="cx">                 2D5036751BCED19F00E20BB3 /* WebGestureEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D5036731BCED19F00E20BB3 /* WebGestureEvent.cpp */; };
</span><span class="cx">                 2D5036761BCED19F00E20BB3 /* WebGestureEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D5036741BCED19F00E20BB3 /* WebGestureEvent.h */; };
</span><del>-                2D5AB62E1A69D6FB0014A9CB /* MessageRecorder.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D5AB62B1A69D6FB0014A9CB /* MessageRecorder.h */; };
-                2D5AB62F1A69D6FB0014A9CB /* MessageRecorder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D5AB62C1A69D6FB0014A9CB /* MessageRecorder.cpp */; };
-                2D5AB6301A69D6FB0014A9CB /* MessageRecorderProbes.d in Sources */ = {isa = PBXBuildFile; fileRef = 2D5AB62D1A69D6FB0014A9CB /* MessageRecorderProbes.d */; };
</del><span class="cx">                 2D5C9D0519C81D8F00B3C5C1 /* WebPageOverlay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D5C9D0319C81D8F00B3C5C1 /* WebPageOverlay.cpp */; };
</span><span class="cx">                 2D5C9D0619C81D8F00B3C5C1 /* WebPageOverlay.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D5C9D0419C81D8F00B3C5C1 /* WebPageOverlay.h */; };
</span><span class="cx">                 2D6AB541192B1C4A003A9FD1 /* WKPDFPageNumberIndicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D6AB53F192B1C4A003A9FD1 /* WKPDFPageNumberIndicator.h */; };
</span><span class="lines">@@ -2662,9 +2659,6 @@
</span><span class="cx">                 2D50366A1BCDE17900E20BB3 /* NativeWebGestureEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeWebGestureEvent.h; sourceTree = "<group>"; };
</span><span class="cx">                 2D5036731BCED19F00E20BB3 /* WebGestureEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebGestureEvent.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 2D5036741BCED19F00E20BB3 /* WebGestureEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGestureEvent.h; sourceTree = "<group>"; };
</span><del>-                2D5AB62B1A69D6FB0014A9CB /* MessageRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageRecorder.h; sourceTree = "<group>"; };
-                2D5AB62C1A69D6FB0014A9CB /* MessageRecorder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MessageRecorder.cpp; sourceTree = "<group>"; };
-                2D5AB62D1A69D6FB0014A9CB /* MessageRecorderProbes.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = MessageRecorderProbes.d; sourceTree = "<group>"; };
</del><span class="cx">                 2D5C9D0319C81D8F00B3C5C1 /* WebPageOverlay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebPageOverlay.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 2D5C9D0419C81D8F00B3C5C1 /* WebPageOverlay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPageOverlay.h; sourceTree = "<group>"; };
</span><span class="cx">                 2D6AB53F192B1C4A003A9FD1 /* WKPDFPageNumberIndicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WKPDFPageNumberIndicator.h; path = ios/WKPDFPageNumberIndicator.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -4828,9 +4822,6 @@
</span><span class="cx">                                 1A3EED11161A53D600AEB4F5 /* MessageReceiver.h */,
</span><span class="cx">                                 1A3EED0C161A535300AEB4F5 /* MessageReceiverMap.cpp */,
</span><span class="cx">                                 1A3EED0D161A535300AEB4F5 /* MessageReceiverMap.h */,
</span><del>-                                2D5AB62C1A69D6FB0014A9CB /* MessageRecorder.cpp */,
-                                2D5AB62B1A69D6FB0014A9CB /* MessageRecorder.h */,
-                                2D5AB62D1A69D6FB0014A9CB /* MessageRecorderProbes.d */,
</del><span class="cx">                                 1AAB0377185A7C6A00EDF501 /* MessageSender.cpp */,
</span><span class="cx">                                 1AAB0378185A7C6A00EDF501 /* MessageSender.h */,
</span><span class="cx">                                 2D7F130F1A702FBA009A6FBD /* ProcessType.h */,
</span><span class="lines">@@ -7634,7 +7625,6 @@
</span><span class="cx">                                 1AC4C82916B876A90069DCCD /* MessageFlags.h in Headers */,
</span><span class="cx">                                 1A3EED12161A53D600AEB4F5 /* MessageReceiver.h in Headers */,
</span><span class="cx">                                 1A3EED0F161A535400AEB4F5 /* MessageReceiverMap.h in Headers */,
</span><del>-                                2D5AB62E1A69D6FB0014A9CB /* MessageRecorder.h in Headers */,
</del><span class="cx">                                 1AAB037A185A7C6A00EDF501 /* MessageSender.h in Headers */,
</span><span class="cx">                                 C0E3AA7C1209E83C00A49D01 /* Module.h in Headers */,
</span><span class="cx">                                 2D50366B1BCDE17900E20BB3 /* NativeWebGestureEvent.h in Headers */,
</span><span class="lines">@@ -9096,8 +9086,6 @@
</span><span class="cx">                                 1A24B5F211F531E800C38269 /* MachUtilities.cpp in Sources */,
</span><span class="cx">                                 51933DF01965EB31008AC3EA /* MenuUtilities.mm in Sources */,
</span><span class="cx">                                 1A3EED0E161A535400AEB4F5 /* MessageReceiverMap.cpp in Sources */,
</span><del>-                                2D5AB62F1A69D6FB0014A9CB /* MessageRecorder.cpp in Sources */,
-                                2D5AB6301A69D6FB0014A9CB /* MessageRecorderProbes.d in Sources */,
</del><span class="cx">                                 1AAB0379185A7C6A00EDF501 /* MessageSender.cpp in Sources */,
</span><span class="cx">                                 C0E3AA7B1209E83500A49D01 /* Module.cpp in Sources */,
</span><span class="cx">                                 C0E3AA7A1209E83000A49D01 /* ModuleCF.cpp in Sources */,
</span></span></pre>
</div>
</div>
</body>
</html>