diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-07 11:22:47 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-07 11:22:47 +0100 |
commit | cfd86b747d32ac22246a1aa908eaa720c63a88c1 (patch) | |
tree | 24d68c6f61c464ecba1e05670b80390ea3b0e50c /Source/WebKit2/Shared/WebMemorySampler.cpp | |
parent | 69d7c744c9de19d152dbe2d8e46eb7dfd4511d1a (diff) | |
download | qtwebkit-cfd86b747d32ac22246a1aa908eaa720c63a88c1.tar.gz |
Imported WebKit commit 20271caf2e2c016d5cef40184cddeefeac4f1876 (http://svn.webkit.org/repository/webkit/trunk@133733)
New snapshot that contains all previous fixes as well as build fix for latest QtMultimedia API changes.
Diffstat (limited to 'Source/WebKit2/Shared/WebMemorySampler.cpp')
-rw-r--r-- | Source/WebKit2/Shared/WebMemorySampler.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/WebKit2/Shared/WebMemorySampler.cpp b/Source/WebKit2/Shared/WebMemorySampler.cpp index 344f7f573..2cfd19b44 100644 --- a/Source/WebKit2/Shared/WebMemorySampler.cpp +++ b/Source/WebKit2/Shared/WebMemorySampler.cpp @@ -29,6 +29,7 @@ #if ENABLE(MEMORY_SAMPLER) #include <stdio.h> +#include <unistd.h> #include <wtf/text/CString.h> #include <wtf/text/StringBuilder.h> @@ -82,7 +83,7 @@ void WebMemorySampler::start(const SandboxExtension::Handle& sampleLogFileHandle void WebMemorySampler::initializeTimers(double interval) { m_sampleTimer.startRepeating(1); - printf("Started memory sampler for process %s", processName().utf8().data()); + printf("Started memory sampler for process %s %d", processName().utf8().data(), getpid()); if (interval > 0) { m_stopTimer.startOneShot(interval); printf(" for a interval of %g seconds", interval); @@ -98,7 +99,7 @@ void WebMemorySampler::stop() return; m_sampleTimer.stop(); m_sampleLogFile = 0; - printf("Stopped memory sampler for process %s\n", processName().utf8().data()); + printf("Stopped memory sampler for process %s %d\n", processName().utf8().data(), getpid()); // Flush stdout buffer so python script can be guaranteed to read up to this point. fflush(stdout); m_isRunning = false; @@ -135,7 +136,7 @@ void WebMemorySampler::initializeSandboxedLogFile(const SandboxExtension::Handle void WebMemorySampler::writeHeaders() { - String processDetails = "Process: " + processName() + '\n'; + String processDetails = String::format("Process: %s Pid: %d\n", processName().utf8().data(), getpid()); CString utf8String = processDetails.utf8(); writeToFile(m_sampleLogFile, utf8String.data(), utf8String.length()); |