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

Side by Side Diff: src/ic.cc

Issue 9471008: Profiler experiments: be more careful when accessing TypeFeedbackInfo (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 new_state == UNINITIALIZED || new_state == PREMONOMORPHIC; 308 new_state == UNINITIALIZED || new_state == PREMONOMORPHIC;
309 int delta = 0; 309 int delta = 0;
310 if (was_uninitialized && !is_uninitialized) { 310 if (was_uninitialized && !is_uninitialized) {
311 delta = 1; 311 delta = 1;
312 } else if (!was_uninitialized && is_uninitialized) { 312 } else if (!was_uninitialized && is_uninitialized) {
313 delta = -1; 313 delta = -1;
314 } 314 }
315 if (delta != 0) { 315 if (delta != 0) {
316 Code* host = target->GetHeap()->isolate()-> 316 Code* host = target->GetHeap()->isolate()->
317 inner_pointer_to_code_cache()->GetCacheEntry(address)->code; 317 inner_pointer_to_code_cache()->GetCacheEntry(address)->code;
318 TypeFeedbackInfo* info = 318 // Not all Code objects have TypeFeedbackInfo.
319 TypeFeedbackInfo::cast(host->type_feedback_info()); 319 if (host->type_feedback_info()->IsTypeFeedbackInfo()) {
320 info->set_ic_with_typeinfo_count( 320 TypeFeedbackInfo* info =
321 info->ic_with_typeinfo_count() + delta); 321 TypeFeedbackInfo::cast(host->type_feedback_info());
322 info->set_ic_with_typeinfo_count(
323 info->ic_with_typeinfo_count() + delta);
324 }
322 } 325 }
323 } 326 }
324 } 327 }
325 if (FLAG_watch_ic_patching) { 328 if (FLAG_watch_ic_patching) {
326 Isolate::Current()->runtime_profiler()->NotifyICChanged(); 329 Isolate::Current()->runtime_profiler()->NotifyICChanged();
327 // We do not want to optimize until the ICs have settled down, 330 // We do not want to optimize until the ICs have settled down,
328 // so when they are patched, we postpone optimization for the 331 // so when they are patched, we postpone optimization for the
329 // current function and the functions above it on the stack that 332 // current function and the functions above it on the stack that
330 // might want to inline this one. 333 // might want to inline this one.
331 StackFrameIterator it; 334 StackFrameIterator it;
(...skipping 2221 matching lines...) Expand 10 before | Expand all | Expand 10 after
2553 #undef ADDR 2556 #undef ADDR
2554 }; 2557 };
2555 2558
2556 2559
2557 Address IC::AddressFromUtilityId(IC::UtilityId id) { 2560 Address IC::AddressFromUtilityId(IC::UtilityId id) {
2558 return IC_utilities[id]; 2561 return IC_utilities[id];
2559 } 2562 }
2560 2563
2561 2564
2562 } } // namespace v8::internal 2565 } } // 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