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

Unified Diff: runtime/bin/main.cc

Issue 11490026: Move generate_perf_events_symbols flag to VM (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Changing email to @google.com instead of @chromium.org Created 8 years 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 | « no previous file | runtime/vm/code_observers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/main.cc
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index 8700364b990d014a83c82fd93dd6e8f0469bbe09..573bd9bc14fe917b8945d33219f92ad6d3a07b7d 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -26,12 +26,6 @@
// it is initialized to NULL.
extern const uint8_t* snapshot_buffer;
-
-// Global state that indicates whether perf_events symbol information
-// is to be generated or not.
-static File* perf_events_symbols_file = NULL;
-
-
// Global state that indicates whether pprof symbol information is
// to be generated or not.
static const char* generate_pprof_symbols_filename = NULL;
@@ -153,27 +147,6 @@ static bool ProcessDebugOption(const char* port) {
return true;
}
-
-static bool ProcessPerfEventsOption(const char* option) {
- ASSERT(option != NULL);
- if (perf_events_symbols_file == NULL) {
- // TODO(cshapiro): eliminate the #ifdef by moving this code to a
- // Linux specific source file.
-#if defined(TARGET_OS_LINUX)
- const char* format = "/tmp/perf-%ld.map";
- intptr_t pid = Process::CurrentProcessId();
- intptr_t len = snprintf(NULL, 0, format, pid);
- char* filename = new char[len + 1];
- snprintf(filename, len + 1, format, pid);
- perf_events_symbols_file = File::Open(filename, File::kWriteTruncate);
- ASSERT(perf_events_symbols_file != NULL);
- delete[] filename;
-#endif
- }
- return true;
-}
-
-
static bool ProcessPprofOption(const char* filename) {
ASSERT(filename != NULL);
generate_pprof_symbols_filename = filename;
@@ -206,7 +179,6 @@ static struct {
{ "--break_at=", ProcessBreakpointOption },
{ "--compile_all", ProcessCompileAllOption },
{ "--debug", ProcessDebugOption },
- { "--generate_perf_events_symbols", ProcessPerfEventsOption },
{ "--generate_pprof_symbols=", ProcessPprofOption },
{ "--use_script_snapshot=", ProcessScriptSnapshotOption },
{ NULL, NULL }
@@ -306,10 +278,6 @@ static int ParseArguments(int argc,
}
}
- if (perf_events_symbols_file != NULL) {
- Dart_InitPerfEventsSupport(perf_events_symbols_file);
- }
-
if (generate_pprof_symbols_filename != NULL) {
Dart_InitPprofSupport();
}
« no previous file with comments | « no previous file | runtime/vm/code_observers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698