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

Side by Side Diff: src/assembler.cc

Issue 10824032: Enables V8 integration with the Intel VTune performance analysis tool. This allows the VTune profi… (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 5 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
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after
1323 1323
1324 void PositionsRecorder::RecordPosition(int pos) { 1324 void PositionsRecorder::RecordPosition(int pos) {
1325 ASSERT(pos != RelocInfo::kNoPosition); 1325 ASSERT(pos != RelocInfo::kNoPosition);
1326 ASSERT(pos >= 0); 1326 ASSERT(pos >= 0);
1327 state_.current_position = pos; 1327 state_.current_position = pos;
1328 #ifdef ENABLE_GDB_JIT_INTERFACE 1328 #ifdef ENABLE_GDB_JIT_INTERFACE
1329 if (gdbjit_lineinfo_ != NULL) { 1329 if (gdbjit_lineinfo_ != NULL) {
1330 gdbjit_lineinfo_->SetPosition(assembler_->pc_offset(), pos, false); 1330 gdbjit_lineinfo_->SetPosition(assembler_->pc_offset(), pos, false);
1331 } 1331 }
1332 #endif 1332 #endif
1333 #ifdef ENABLE_VTUNE_JIT_INTERFACE
1334 if (VTUNERUNNING) {
1335 if (vtunejit_lineinfo_ != NULL) {
1336 vtunejit_lineinfo_->AddLineInfo(
danno 2012/08/02 12:38:11 This should trigger an event callback in the API r
1337 assembler_->pc_offset(),
1338 pos);
1339 }
1340 }
1341 #endif
1333 } 1342 }
1334 1343
1335 1344
1336 void PositionsRecorder::RecordStatementPosition(int pos) { 1345 void PositionsRecorder::RecordStatementPosition(int pos) {
1337 ASSERT(pos != RelocInfo::kNoPosition); 1346 ASSERT(pos != RelocInfo::kNoPosition);
1338 ASSERT(pos >= 0); 1347 ASSERT(pos >= 0);
1339 state_.current_statement_position = pos; 1348 state_.current_statement_position = pos;
1340 #ifdef ENABLE_GDB_JIT_INTERFACE 1349 #ifdef ENABLE_GDB_JIT_INTERFACE
1341 if (gdbjit_lineinfo_ != NULL) { 1350 if (gdbjit_lineinfo_ != NULL) {
1342 gdbjit_lineinfo_->SetPosition(assembler_->pc_offset(), pos, true); 1351 gdbjit_lineinfo_->SetPosition(assembler_->pc_offset(), pos, true);
1343 } 1352 }
1344 #endif 1353 #endif
1354 #ifdef ENABLE_VTUNE_JIT_INTERFACE
1355 if (VTUNERUNNING)
1356 if (vtunejit_lineinfo_ != NULL) {
1357 vtunejit_lineinfo_->AddLineInfo(
1358 assembler_->pc_offset(),
1359 pos);
1360 }
1361 #endif
1345 } 1362 }
1346 1363
1347 1364
1348 bool PositionsRecorder::WriteRecordedPositions() { 1365 bool PositionsRecorder::WriteRecordedPositions() {
1349 bool written = false; 1366 bool written = false;
1350 1367
1351 // Write the statement position if it is different from what was written last 1368 // Write the statement position if it is different from what was written last
1352 // time. 1369 // time.
1353 if (state_.current_statement_position != state_.written_statement_position) { 1370 if (state_.current_statement_position != state_.written_statement_position) {
1354 EnsureSpace ensure_space(assembler_); 1371 EnsureSpace ensure_space(assembler_);
(...skipping 11 matching lines...) Expand all
1366 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); 1383 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position);
1367 state_.written_position = state_.current_position; 1384 state_.written_position = state_.current_position;
1368 written = true; 1385 written = true;
1369 } 1386 }
1370 1387
1371 // Return whether something was written. 1388 // Return whether something was written.
1372 return written; 1389 return written;
1373 } 1390 }
1374 1391
1375 } } // namespace v8::internal 1392 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698