[Lldb-commits] [PATCH] Increase the timeout for pwrite on android

Tamas Berghammer tberghammer at google.com
Mon Feb 23 03:59:03 PST 2015


>From now on this CL is depends on http://reviews.llvm.org/D7826


================
Comment at: source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp:233
@@ +232,3 @@
+{
+    uint32_t old_packet_timeout = m_gdb_client.SetPacketTimeout (5);
+    uint64_t res = PlatformRemoteGDBServer::WriteFile (fd, offset, src, src_len, error);
----------------
ovyalov wrote:
> ovyalov wrote:
> > It will be great to have sort of ScopedTimeout class which sets a new timeout in constructor (along with saving a previous old timeout value) and resets old value in destructor.
> > As I can see such pattern (set new timeout/ restore old timeout)  has a few occurrences 
> For such request the transfer latency depends on a size of buffer (src_len) - is it possible to make timeout a function of buffer size?
Currently we have a previous layer which makes each request at most 1024 byte but the latency still have a huge variance (most of the request is fast, but some of them is very slow). Based on it I don't think we can make a reasonable function from buffer size to timeout because a huge part of the latency caused by factors independent from it.

================
Comment at: source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp:233
@@ +232,3 @@
+{
+    uint32_t old_packet_timeout = m_gdb_client.SetPacketTimeout (5);
+    uint64_t res = PlatformRemoteGDBServer::WriteFile (fd, offset, src, src_len, error);
----------------
tberghammer wrote:
> ovyalov wrote:
> > ovyalov wrote:
> > > It will be great to have sort of ScopedTimeout class which sets a new timeout in constructor (along with saving a previous old timeout value) and resets old value in destructor.
> > > As I can see such pattern (set new timeout/ restore old timeout)  has a few occurrences 
> > For such request the transfer latency depends on a size of buffer (src_len) - is it possible to make timeout a function of buffer size?
> Currently we have a previous layer which makes each request at most 1024 byte but the latency still have a huge variance (most of the request is fast, but some of them is very slow). Based on it I don't think we can make a reasonable function from buffer size to timeout because a huge part of the latency caused by factors independent from it.
I created the scoped timeout class (D7826) and updated this CL to use it

http://reviews.llvm.org/D7788

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the lldb-commits mailing list