Commit 4229ca20 authored by Jaroslav Sevcik's avatar Jaroslav Sevcik Committed by Commit Bot

[profiler] Fix logging addresses on Windows.

Change-Id: Iff0dcec95d04b85d31a452fed31b1500ad17a9f0
Reviewed-on: https://chromium-review.googlesource.com/591373
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46976}
parent ccd8bb69
......@@ -160,7 +160,7 @@ void Log::MessageBuilder::Append(String* str) {
}
void Log::MessageBuilder::AppendAddress(Address addr) {
Append("%p", static_cast<void*>(addr));
Append("0x%" V8PRIxPTR, reinterpret_cast<intptr_t>(addr));
}
void Log::MessageBuilder::AppendSymbolName(Symbol* symbol) {
......
......@@ -376,8 +376,9 @@ TEST(LogCallbacks) {
ObjMethod1_entry = *FUNCTION_ENTRYPOINT_ADDRESS(ObjMethod1_entry);
#endif
i::EmbeddedVector<char, 100> ref_data;
i::SNPrintF(ref_data, "code-creation,Callback,-2,-1,%p,1,\"method1\"",
static_cast<void*>(ObjMethod1_entry));
i::SNPrintF(ref_data,
"code-creation,Callback,-2,-1,0x%" V8PRIxPTR ",1,\"method1\"",
reinterpret_cast<intptr_t>(ObjMethod1_entry));
CHECK(StrNStr(log.start(), ref_data.start(), log.length()));
log.Dispose();
......@@ -429,8 +430,8 @@ TEST(LogAccessorCallbacks) {
#endif
EmbeddedVector<char, 100> prop1_getter_record;
i::SNPrintF(prop1_getter_record,
"code-creation,Callback,-2,-1,%p,1,\"get prop1\"",
static_cast<void*>(Prop1Getter_entry));
"code-creation,Callback,-2,-1,0x%" V8PRIxPTR ",1,\"get prop1\"",
reinterpret_cast<intptr_t>(Prop1Getter_entry));
CHECK(StrNStr(log.start(), prop1_getter_record.start(), log.length()));
Address Prop1Setter_entry = reinterpret_cast<Address>(Prop1Setter);
......@@ -439,8 +440,8 @@ TEST(LogAccessorCallbacks) {
#endif
EmbeddedVector<char, 100> prop1_setter_record;
i::SNPrintF(prop1_setter_record,
"code-creation,Callback,-2,-1,%p,1,\"set prop1\"",
static_cast<void*>(Prop1Setter_entry));
"code-creation,Callback,-2,-1,0x%" V8PRIxPTR ",1,\"set prop1\"",
reinterpret_cast<intptr_t>(Prop1Setter_entry));
CHECK(StrNStr(log.start(), prop1_setter_record.start(), log.length()));
Address Prop2Getter_entry = reinterpret_cast<Address>(Prop2Getter);
......@@ -449,8 +450,8 @@ TEST(LogAccessorCallbacks) {
#endif
EmbeddedVector<char, 100> prop2_getter_record;
i::SNPrintF(prop2_getter_record,
"code-creation,Callback,-2,-1,%p,1,\"get prop2\"",
static_cast<void*>(Prop2Getter_entry));
"code-creation,Callback,-2,-1,0x%" V8PRIxPTR ",1,\"get prop2\"",
reinterpret_cast<intptr_t>(Prop2Getter_entry));
CHECK(StrNStr(log.start(), prop2_getter_record.start(), log.length()));
log.Dispose();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment