summaryrefslogtreecommitdiffstats
path: root/net/socket
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-21 03:04:20 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-21 03:04:20 +0000
commit6990bdfce1a73519e2c4ae08fd13d6896caeaa81 (patch)
treeb9af6bfbc48468685cd640702524a8545493cda1 /net/socket
parent0b0c008023454cbb6c9328f23bda8422db46bebd (diff)
downloadchromium_src-6990bdfce1a73519e2c4ae08fd13d6896caeaa81.zip
chromium_src-6990bdfce1a73519e2c4ae08fd13d6896caeaa81.tar.gz
chromium_src-6990bdfce1a73519e2c4ae08fd13d6896caeaa81.tar.bz2
Remove the TRACE_EVENT for network states. This is no longer needed, since most of these states are captured by the NetLog.
Review URL: http://codereview.chromium.org/2105013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47878 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket')
-rw-r--r--net/socket/tcp_client_socket_libevent.cc9
-rw-r--r--net/socket/tcp_client_socket_win.cc16
2 files changed, 0 insertions, 25 deletions
diff --git a/net/socket/tcp_client_socket_libevent.cc b/net/socket/tcp_client_socket_libevent.cc
index 1aaf3e3..74ab2b7 100644
--- a/net/socket/tcp_client_socket_libevent.cc
+++ b/net/socket/tcp_client_socket_libevent.cc
@@ -17,7 +17,6 @@
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/string_util.h"
-#include "base/trace_event.h"
#include "base/values.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
@@ -330,10 +329,8 @@ int TCPClientSocketLibevent::Read(IOBuffer* buf,
DCHECK(callback);
DCHECK_GT(buf_len, 0);
- TRACE_EVENT_BEGIN("socket.read", this, "");
int nread = HANDLE_EINTR(read(socket_, buf->data(), buf_len));
if (nread >= 0) {
- TRACE_EVENT_END("socket.read", this, StringPrintf("%d bytes", nread));
net_log_.AddEvent(NetLog::TYPE_SOCKET_BYTES_RECEIVED,
new NetLogIntegerParameter("num_bytes", nread));
return nread;
@@ -367,10 +364,8 @@ int TCPClientSocketLibevent::Write(IOBuffer* buf,
DCHECK(callback);
DCHECK_GT(buf_len, 0);
- TRACE_EVENT_BEGIN("socket.write", this, "");
int nwrite = HANDLE_EINTR(write(socket_, buf->data(), buf_len));
if (nwrite >= 0) {
- TRACE_EVENT_END("socket.write", this, StringPrintf("%d bytes", nwrite));
net_log_.AddEvent(NetLog::TYPE_SOCKET_BYTES_SENT,
new NetLogIntegerParameter("num_bytes", nwrite));
return nwrite;
@@ -486,8 +481,6 @@ void TCPClientSocketLibevent::DidCompleteRead() {
int result;
if (bytes_transferred >= 0) {
- TRACE_EVENT_END("socket.read", this,
- StringPrintf("%d bytes", bytes_transferred));
result = bytes_transferred;
net_log_.AddEvent(NetLog::TYPE_SOCKET_BYTES_RECEIVED,
new NetLogIntegerParameter("num_bytes", result));
@@ -512,8 +505,6 @@ void TCPClientSocketLibevent::DidCompleteWrite() {
int result;
if (bytes_transferred >= 0) {
result = bytes_transferred;
- TRACE_EVENT_END("socket.write", this,
- StringPrintf("%d bytes", bytes_transferred));
net_log_.AddEvent(NetLog::TYPE_SOCKET_BYTES_SENT,
new NetLogIntegerParameter("num_bytes", result));
} else {
diff --git a/net/socket/tcp_client_socket_win.cc b/net/socket/tcp_client_socket_win.cc
index a24a313..423016e 100644
--- a/net/socket/tcp_client_socket_win.cc
+++ b/net/socket/tcp_client_socket_win.cc
@@ -10,7 +10,6 @@
#include "base/stats_counters.h"
#include "base/string_util.h"
#include "base/sys_info.h"
-#include "base/trace_event.h"
#include "net/base/connection_type_histograms.h"
#include "net/base/io_buffer.h"
#include "net/base/net_log.h"
@@ -301,8 +300,6 @@ int TCPClientSocketWin::Connect(CompletionCallback* callback) {
static StatsCounter connects("tcp.connect");
connects.Increment();
- TRACE_EVENT_BEGIN("socket.connect", this, "");
-
net_log_.BeginEvent(NetLog::TYPE_TCP_CONNECT, NULL);
int rv = DoConnect();
@@ -314,7 +311,6 @@ int TCPClientSocketWin::Connect(CompletionCallback* callback) {
waiting_connect_ = true;
read_callback_ = callback;
} else {
- TRACE_EVENT_END("socket.connect", this, "");
net_log_.EndEvent(NetLog::TYPE_TCP_CONNECT, NULL);
if (rv == OK)
UpdateConnectionTypeHistograms(CONNECTION_ANY);
@@ -375,8 +371,6 @@ void TCPClientSocketWin::Disconnect() {
if (socket_ == INVALID_SOCKET)
return;
- TRACE_EVENT_INSTANT("socket.disconnect", this, "");
-
// Note: don't use CancelIo to cancel pending IO because it doesn't work
// when there is a Winsock layered service provider.
@@ -467,7 +461,6 @@ int TCPClientSocketWin::Read(IOBuffer* buf,
core_->read_buffer_.len = buf_len;
core_->read_buffer_.buf = buf->data();
- TRACE_EVENT_BEGIN("socket.read", this, "");
// TODO(wtc): Remove the CHECK after enough testing.
CHECK_EQ(WAIT_TIMEOUT,
WaitForSingleObject(core_->read_overlapped_.hEvent, 0));
@@ -476,8 +469,6 @@ int TCPClientSocketWin::Read(IOBuffer* buf,
&core_->read_overlapped_, NULL);
if (rv == 0) {
if (ResetEventIfSignaled(core_->read_overlapped_.hEvent)) {
- TRACE_EVENT_END("socket.read", this, StringPrintf("%d bytes", num));
-
// Because of how WSARecv fills memory when used asynchronously, Purify
// isn't able to detect that it's been initialized, so it scans for 0xcd
// in the buffer and reports UMRs (uninitialized memory reads) for those
@@ -520,7 +511,6 @@ int TCPClientSocketWin::Write(IOBuffer* buf,
core_->write_buffer_.buf = buf->data();
core_->write_buffer_length_ = buf_len;
- TRACE_EVENT_BEGIN("socket.write", this, "");
// TODO(wtc): Remove the CHECK after enough testing.
CHECK_EQ(WAIT_TIMEOUT,
WaitForSingleObject(core_->write_overlapped_.hEvent, 0));
@@ -537,7 +527,6 @@ int TCPClientSocketWin::Write(IOBuffer* buf,
<< " bytes, but " << rv << " bytes reported.";
return ERR_WINSOCK_UNEXPECTED_WRITTEN_BYTES;
}
- TRACE_EVENT_END("socket.write", this, StringPrintf("%d bytes", rv));
static StatsCounter write_bytes("tcp.write_bytes");
write_bytes.Add(rv);
net_log_.AddEvent(NetLog::TYPE_SOCKET_BYTES_SENT,
@@ -675,18 +664,15 @@ void TCPClientSocketWin::DidCompleteConnect() {
const struct addrinfo* next = current_ai_->ai_next;
Disconnect();
current_ai_ = next;
- TRACE_EVENT_END("socket.connect", this, "");
net_log_.EndEvent(NetLog::TYPE_TCP_CONNECT, NULL);
result = Connect(read_callback_);
} else {
result = MapConnectError(os_error);
- TRACE_EVENT_END("socket.connect", this, "");
net_log_.EndEvent(NetLog::TYPE_TCP_CONNECT, NULL);
}
} else {
NOTREACHED();
result = ERR_UNEXPECTED;
- TRACE_EVENT_END("socket.connect", this, "");
net_log_.EndEvent(NetLog::TYPE_TCP_CONNECT, NULL);
}
@@ -703,7 +689,6 @@ void TCPClientSocketWin::DidCompleteRead() {
BOOL ok = WSAGetOverlappedResult(socket_, &core_->read_overlapped_,
&num_bytes, FALSE, &flags);
WSAResetEvent(core_->read_overlapped_.hEvent);
- TRACE_EVENT_END("socket.read", this, StringPrintf("%d bytes", num_bytes));
waiting_read_ = false;
core_->read_iobuffer_ = NULL;
if (ok) {
@@ -720,7 +705,6 @@ void TCPClientSocketWin::DidCompleteWrite() {
BOOL ok = WSAGetOverlappedResult(socket_, &core_->write_overlapped_,
&num_bytes, FALSE, &flags);
WSAResetEvent(core_->write_overlapped_.hEvent);
- TRACE_EVENT_END("socket.write", this, StringPrintf("%d bytes", num_bytes));
waiting_write_ = false;
int rv;
if (!ok) {