//
class Ticker: public Sampler {
public:
- explicit Ticker(int interval, unsigned int low_stack_bound):
+ explicit Ticker(int interval, uintptr_t low_stack_bound):
Sampler(interval, FLAG_prof), window_(NULL), profiler_(NULL),
stack_tracer_(low_stack_bound) {}
#ifdef ENABLE_LOGGING_AND_PROFILING
if (!Log::is_enabled() || !FLAG_log_handles) return;
LogMessageBuilder msg;
- msg.Append("%s,0x%x\n", name,
- reinterpret_cast<unsigned int>(location));
+ msg.Append("%s,0x%%"V8PRIp"\n", name, location);
msg.WriteToLogFile();
#endif
}
#ifdef ENABLE_LOGGING_AND_PROFILING
if (!Log::is_enabled() || !FLAG_log) return;
LogMessageBuilder msg;
- msg.Append("new,%s,0x%x,%u\n", name,
- reinterpret_cast<unsigned int>(object),
+ msg.Append("new,%s,0x%%"V8PRIp",%u\n", name, object,
static_cast<unsigned int>(size));
msg.WriteToLogFile();
#endif
#ifdef ENABLE_LOGGING_AND_PROFILING
if (!Log::is_enabled() || !FLAG_log) return;
LogMessageBuilder msg;
- msg.Append("delete,%s,0x%x\n", name,
- reinterpret_cast<unsigned int>(object));
+ msg.Append("delete,%s,0x%%"V8PRIp"\n", name, object);
msg.WriteToLogFile();
#endif
}
#ifdef ENABLE_LOGGING_AND_PROFILING
if (!Log::is_enabled() || !FLAG_log_code) return;
LogMessageBuilder msg;
- msg.Append("code-creation,%s,0x%x,%d,\"", tag,
- reinterpret_cast<unsigned int>(code->address()),
+ msg.Append("code-creation,%s,0x%"V8PRIp",%d,\"", tag, code->address(),
code->ExecutableSize());
for (const char* p = comment; *p != '\0'; p++) {
if (*p == '"') {
LogMessageBuilder msg;
SmartPointer<char> str =
name->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
- msg.Append("code-creation,%s,0x%x,%d,\"%s\"\n", tag,
- reinterpret_cast<unsigned int>(code->address()),
+ msg.Append("code-creation,%s,0x%"V8PRIp",%d,\"%s\"\n", tag, code->address(),
code->ExecutableSize(), *str);
msg.WriteToLogFile();
#endif
name->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
SmartPointer<char> sourcestr =
source->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
- msg.Append("code-creation,%s,0x%x,%d,\"%s %s:%d\"\n", tag,
- reinterpret_cast<unsigned int>(code->address()),
+ msg.Append("code-creation,%s,0x%"V8PRIp",%d,\"%s %s:%d\"\n", tag, code->address(),
code->ExecutableSize(),
*str, *sourcestr, line);
msg.WriteToLogFile();
#ifdef ENABLE_LOGGING_AND_PROFILING
if (!Log::is_enabled() || !FLAG_log_code) return;
LogMessageBuilder msg;
- msg.Append("code-creation,%s,0x%x,%d,\"args_count: %d\"\n", tag,
- reinterpret_cast<unsigned int>(code->address()),
+ msg.Append("code-creation,%s,0x%"V8PRIp",%d,\"args_count: %d\"\n", tag,
+ code->address(),
code->ExecutableSize(),
args_count);
msg.WriteToLogFile();
#ifdef ENABLE_LOGGING_AND_PROFILING
if (!Log::is_enabled() || !FLAG_log_code) return;
LogMessageBuilder msg;
- msg.Append("code-creation,%s,0x%x,%d,\"", "RegExp",
- reinterpret_cast<unsigned int>(code->address()),
+ msg.Append("code-creation,%s,0x%"V8PRIp",%d,\"", "RegExp",
+ code->address(),
code->ExecutableSize());
msg.AppendDetailed(source, false);
msg.Append("\"\n");
#ifdef ENABLE_LOGGING_AND_PROFILING
if (!Log::is_enabled() || !FLAG_log_code) return;
LogMessageBuilder msg;
- msg.Append("code-allocate,0x%x,0x%x\n",
- reinterpret_cast<unsigned int>(code->address()),
- reinterpret_cast<unsigned int>(assem));
+ msg.Append("code-allocate,0x%"V8PRIp",0x%"V8PRIp"\n", code->address(), assem);
msg.WriteToLogFile();
#endif
}
#ifdef ENABLE_LOGGING_AND_PROFILING
if (!Log::is_enabled() || !FLAG_log_code) return;
LogMessageBuilder msg;
- msg.Append("code-move,0x%x,0x%x\n",
- reinterpret_cast<unsigned int>(from),
- reinterpret_cast<unsigned int>(to));
+ msg.Append("code-move,0x%"V8PRIp",0x%"V8PRIp"\n", from, to);
msg.WriteToLogFile();
#endif
}
#ifdef ENABLE_LOGGING_AND_PROFILING
if (!Log::is_enabled() || !FLAG_log_code) return;
LogMessageBuilder msg;
- msg.Append("code-delete,0x%x\n", reinterpret_cast<unsigned int>(from));
+ msg.Append("code-delete,0x%"V8PRIp"\n", from);
msg.WriteToLogFile();
#endif
}
msg.Append(",overflow");
}
for (int i = 0; i < sample->frames_count; ++i) {
- msg.Append(",0x%x", reinterpret_cast<uint32_t>(sample->stack[i]));
+ msg.Append(",0x%"V8PRIp, sample->stack[i]);
}
msg.Append('\n');
msg.WriteToLogFile();
// as log is initialized early with V8, we can assume that JS execution
// frames can never reach this point on stack
int stack_var;
- ticker_ = new Ticker(1, reinterpret_cast<unsigned int>(&stack_var));
+ ticker_ = new Ticker(1, reinterpret_cast<uintptr_t>(&stack_var));
if (FLAG_sliding_state_window && sliding_state_window_ == NULL) {
sliding_state_window_ = new SlidingStateWindow();