Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(418)

Side by Side Diff: src/log.cc

Issue 4033005: Use size_t for return value from fwrite. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after
1371 LogMessageBuilder msg; 1371 LogMessageBuilder msg;
1372 msg.Append("code-info,%s,%d\n", arch, Code::kHeaderSize); 1372 msg.Append("code-info,%s,%d\n", arch, Code::kHeaderSize);
1373 msg.WriteToLogFile(); 1373 msg.WriteToLogFile();
1374 #endif // ENABLE_LOGGING_AND_PROFILING 1374 #endif // ENABLE_LOGGING_AND_PROFILING
1375 } 1375 }
1376 1376
1377 1377
1378 void Logger::LowLevelCodeCreateEvent(Code* code, LogMessageBuilder* msg) { 1378 void Logger::LowLevelCodeCreateEvent(Code* code, LogMessageBuilder* msg) {
1379 if (!FLAG_ll_prof || Log::output_code_handle_ == NULL) return; 1379 if (!FLAG_ll_prof || Log::output_code_handle_ == NULL) return;
1380 int pos = static_cast<int>(ftell(Log::output_code_handle_)); 1380 int pos = static_cast<int>(ftell(Log::output_code_handle_));
1381 int rv = fwrite(code->instruction_start(), 1, code->instruction_size(), 1381 size_t rv = fwrite(code->instruction_start(), 1, code->instruction_size(),
1382 Log::output_code_handle_); 1382 Log::output_code_handle_);
1383 ASSERT(static_cast<size_t>(code->instruction_size()) == rv); 1383 ASSERT(static_cast<size_t>(code->instruction_size()) == rv);
1384 USE(rv); 1384 USE(rv);
1385 msg->Append(",%d", pos); 1385 msg->Append(",%d", pos);
1386 } 1386 }
1387 1387
1388 1388
1389 void Logger::LogCodeObjects() { 1389 void Logger::LogCodeObjects() {
1390 AssertNoAllocation no_alloc; 1390 AssertNoAllocation no_alloc;
1391 HeapIterator iterator; 1391 HeapIterator iterator;
1392 for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) { 1392 for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) {
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
1641 } 1641 }
1642 // Otherwise, if the sliding state window computation has not been 1642 // Otherwise, if the sliding state window computation has not been
1643 // started we do it now. 1643 // started we do it now.
1644 if (sliding_state_window_ == NULL) { 1644 if (sliding_state_window_ == NULL) {
1645 sliding_state_window_ = new SlidingStateWindow(); 1645 sliding_state_window_ = new SlidingStateWindow();
1646 } 1646 }
1647 #endif 1647 #endif
1648 } 1648 }
1649 1649
1650 } } // namespace v8::internal 1650 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698