Bug 865459 - Fix localization issue in how visual event tracer stores its timestamps, r=ehsan
authorHonza Bambas <honzab.moz@firemni.cz>
Wed, 01 May 2013 18:57:57 +0200
changeset 141435 8f963e16ca906c59dc1b389f5820fce6dccd43bf
parent 141434 4ee7589adadd227ae7ff8a56d4a2a2a21cb9218b
child 141436 74431003f8cc1ac129899253e263f0b1f4392026
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs865459
milestone23.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 865459 - Fix localization issue in how visual event tracer stores its timestamps, r=ehsan
xpcom/base/VisualEventTracer.cpp
--- a/xpcom/base/VisualEventTracer.cpp
+++ b/xpcom/base/VisualEventTracer.cpp
@@ -553,19 +553,19 @@ VisualEventTracerLog::GetJSONString(nsAC
          ++record) {
 
       // mType carries both type and flags, separate type
       // as lower 16 bits and flags as higher 16 bits.
       // The json format expects this separated.
       uint32_t type = record->mType & 0xffffUL;
       uint32_t flags = record->mType >> 16;
       PR_snprintf(buf, kBufferSize,
-        "{\"e\":\"%c\",\"t\":%f,\"f\":%d,\"i\":\"%p\",\"n\":\"%s%s\"}%s\n",
+        "{\"e\":\"%c\",\"t\":%llu,\"f\":%d,\"i\":\"%p\",\"n\":\"%s%s\"}%s\n",
         kTypeChars[type],
-        (record->mTime - mProfilerStart).ToMilliseconds(),
+        static_cast<uint64_t>((record->mTime - mProfilerStart).ToMilliseconds()),
         flags,
         record->mItem,
         record->mText,
         record->mText2 ? record->mText2 : "",
         (record == batch->mNextRecord - 1) ? "" : ",");
 
       buffer.Append(buf);
     }