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

Side by Side Diff: src/crankshaft/hydrogen.cc

Issue 2460973003: [Tracing] Use TracingCategoryObserver in runtime statistics (Closed)
Patch Set: Created 4 years, 1 month 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/crankshaft/hydrogen.h" 5 #include "src/crankshaft/hydrogen.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/allocation-site-scopes.h" 10 #include "src/allocation-site-scopes.h"
(...skipping 8836 matching lines...) Expand 10 before | Expand all | Expand 10 after
8847 default: 8847 default:
8848 // Not yet supported for inlining. 8848 // Not yet supported for inlining.
8849 break; 8849 break;
8850 } 8850 }
8851 return false; 8851 return false;
8852 } 8852 }
8853 8853
8854 8854
8855 bool HOptimizedGraphBuilder::TryInlineApiFunctionCall(Call* expr, 8855 bool HOptimizedGraphBuilder::TryInlineApiFunctionCall(Call* expr,
8856 HValue* receiver) { 8856 HValue* receiver) {
8857 if (FLAG_runtime_call_stats) return false; 8857 if (FLAG_runtime_stats) return false;
8858 Handle<JSFunction> function = expr->target(); 8858 Handle<JSFunction> function = expr->target();
8859 int argc = expr->arguments()->length(); 8859 int argc = expr->arguments()->length();
8860 SmallMapList receiver_maps; 8860 SmallMapList receiver_maps;
8861 return TryInlineApiCall(function, receiver, &receiver_maps, argc, expr->id(), 8861 return TryInlineApiCall(function, receiver, &receiver_maps, argc, expr->id(),
8862 kCallApiFunction, expr->tail_call_mode()); 8862 kCallApiFunction, expr->tail_call_mode());
8863 } 8863 }
8864 8864
8865 8865
8866 bool HOptimizedGraphBuilder::TryInlineApiMethodCall( 8866 bool HOptimizedGraphBuilder::TryInlineApiMethodCall(
8867 Call* expr, 8867 Call* expr,
8868 HValue* receiver, 8868 HValue* receiver,
8869 SmallMapList* receiver_maps) { 8869 SmallMapList* receiver_maps) {
8870 if (FLAG_runtime_call_stats) return false; 8870 if (FLAG_runtime_stats) return false;
8871 Handle<JSFunction> function = expr->target(); 8871 Handle<JSFunction> function = expr->target();
8872 int argc = expr->arguments()->length(); 8872 int argc = expr->arguments()->length();
8873 return TryInlineApiCall(function, receiver, receiver_maps, argc, expr->id(), 8873 return TryInlineApiCall(function, receiver, receiver_maps, argc, expr->id(),
8874 kCallApiMethod, expr->tail_call_mode()); 8874 kCallApiMethod, expr->tail_call_mode());
8875 } 8875 }
8876 8876
8877 bool HOptimizedGraphBuilder::TryInlineApiGetter(Handle<Object> function, 8877 bool HOptimizedGraphBuilder::TryInlineApiGetter(Handle<Object> function,
8878 Handle<Map> receiver_map, 8878 Handle<Map> receiver_map,
8879 BailoutId ast_id) { 8879 BailoutId ast_id) {
8880 if (FLAG_runtime_call_stats) return false; 8880 if (FLAG_runtime_stats) return false;
8881 SmallMapList receiver_maps(1, zone()); 8881 SmallMapList receiver_maps(1, zone());
8882 receiver_maps.Add(receiver_map, zone()); 8882 receiver_maps.Add(receiver_map, zone());
8883 return TryInlineApiCall(function, 8883 return TryInlineApiCall(function,
8884 NULL, // Receiver is on expression stack. 8884 NULL, // Receiver is on expression stack.
8885 &receiver_maps, 0, ast_id, kCallApiGetter, 8885 &receiver_maps, 0, ast_id, kCallApiGetter,
8886 TailCallMode::kDisallow); 8886 TailCallMode::kDisallow);
8887 } 8887 }
8888 8888
8889 bool HOptimizedGraphBuilder::TryInlineApiSetter(Handle<Object> function, 8889 bool HOptimizedGraphBuilder::TryInlineApiSetter(Handle<Object> function,
8890 Handle<Map> receiver_map, 8890 Handle<Map> receiver_map,
8891 BailoutId ast_id) { 8891 BailoutId ast_id) {
8892 SmallMapList receiver_maps(1, zone()); 8892 SmallMapList receiver_maps(1, zone());
8893 receiver_maps.Add(receiver_map, zone()); 8893 receiver_maps.Add(receiver_map, zone());
8894 return TryInlineApiCall(function, 8894 return TryInlineApiCall(function,
8895 NULL, // Receiver is on expression stack. 8895 NULL, // Receiver is on expression stack.
8896 &receiver_maps, 1, ast_id, kCallApiSetter, 8896 &receiver_maps, 1, ast_id, kCallApiSetter,
8897 TailCallMode::kDisallow); 8897 TailCallMode::kDisallow);
8898 } 8898 }
8899 8899
8900 bool HOptimizedGraphBuilder::TryInlineApiCall( 8900 bool HOptimizedGraphBuilder::TryInlineApiCall(
8901 Handle<Object> function, HValue* receiver, SmallMapList* receiver_maps, 8901 Handle<Object> function, HValue* receiver, SmallMapList* receiver_maps,
8902 int argc, BailoutId ast_id, ApiCallType call_type, 8902 int argc, BailoutId ast_id, ApiCallType call_type,
8903 TailCallMode syntactic_tail_call_mode) { 8903 TailCallMode syntactic_tail_call_mode) {
8904 if (FLAG_runtime_call_stats) return false; 8904 if (FLAG_runtime_stats) return false;
8905 if (function->IsJSFunction() && 8905 if (function->IsJSFunction() &&
8906 Handle<JSFunction>::cast(function)->context()->native_context() != 8906 Handle<JSFunction>::cast(function)->context()->native_context() !=
8907 top_info()->closure()->context()->native_context()) { 8907 top_info()->closure()->context()->native_context()) {
8908 return false; 8908 return false;
8909 } 8909 }
8910 if (argc > CallApiCallbackStub::kArgMax) { 8910 if (argc > CallApiCallbackStub::kArgMax) {
8911 return false; 8911 return false;
8912 } 8912 }
8913 8913
8914 CallOptimization optimization(function); 8914 CallOptimization optimization(function);
(...skipping 4080 matching lines...) Expand 10 before | Expand all | Expand 10 after
12995 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 12995 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
12996 } 12996 }
12997 12997
12998 #ifdef DEBUG 12998 #ifdef DEBUG
12999 graph_->Verify(false); // No full verify. 12999 graph_->Verify(false); // No full verify.
13000 #endif 13000 #endif
13001 } 13001 }
13002 13002
13003 } // namespace internal 13003 } // namespace internal
13004 } // namespace v8 13004 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698