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

Unified Diff: runtime/vm/isolate.cc

Issue 1490583002: - Remove unused PrintInvokedFunctions method. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/isolate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.cc
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 63e93c98c60090ef35361e566ec6aeaa0d1d7f0a..61e03af172e5df933911cb6ad653ba76edb3664c 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -1481,18 +1481,6 @@ uword Isolate::GetAndClearStackOverflowFlags() {
}
-static int MostUsedFunctionFirst(const Function* const* a,
- const Function* const* b) {
- if ((*a)->usage_counter() > (*b)->usage_counter()) {
- return -1;
- } else if ((*a)->usage_counter() < (*b)->usage_counter()) {
- return 1;
- } else {
- return 0;
- }
-}
-
-
void Isolate::AddClosureFunction(const Function& function) const {
GrowableObjectArray& closures =
GrowableObjectArray::Handle(object_store()->closure_functions());
@@ -1549,47 +1537,6 @@ RawFunction* Isolate::ClosureFunctionFromIndex(intptr_t idx) const {
}
-static void AddFunctionsFromClass(const Class& cls,
- GrowableArray<const Function*>* functions) {
- const Array& class_functions = Array::Handle(cls.functions());
- // Class 'dynamic' is allocated/initialized in a special way, leaving
- // the functions field NULL instead of empty.
- const int func_len = class_functions.IsNull() ? 0 : class_functions.Length();
- for (int j = 0; j < func_len; j++) {
- Function& function = Function::Handle();
- function ^= class_functions.At(j);
- if (function.usage_counter() > 0) {
- functions->Add(&function);
- }
- }
-}
-
-
-void Isolate::PrintInvokedFunctions() {
- ASSERT(this == Isolate::Current());
- const GrowableObjectArray& libraries =
- GrowableObjectArray::Handle(object_store()->libraries());
- Library& library = Library::Handle();
- GrowableArray<const Function*> invoked_functions;
- for (int i = 0; i < libraries.Length(); i++) {
- library ^= libraries.At(i);
- Class& cls = Class::Handle();
- ClassDictionaryIterator iter(library,
- ClassDictionaryIterator::kIteratePrivate);
- while (iter.HasNext()) {
- cls = iter.GetNextClass();
- AddFunctionsFromClass(cls, &invoked_functions);
- }
- }
- invoked_functions.Sort(MostUsedFunctionFirst);
- for (int i = 0; i < invoked_functions.length(); i++) {
- OS::Print("%10" Pd " x %s\n",
- invoked_functions[i]->usage_counter(),
- invoked_functions[i]->ToFullyQualifiedCString());
- }
-}
-
-
class FinalizeWeakPersistentHandlesVisitor : public HandleVisitor {
public:
FinalizeWeakPersistentHandlesVisitor() : HandleVisitor(Thread::Current()) {
« no previous file with comments | « runtime/vm/isolate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698