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

Unified Diff: init/main.c

Issue 524041: Changes to make upstart log performance stats to a file. (Closed)
Patch Set: More tab/space stuff Created 10 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « init/job.c ('k') | init/perf_log.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: init/main.c
diff --git a/init/main.c b/init/main.c
index bfcd5281112deec81d11831ced1c98b77bae3091..6d4fca324577b34beaaa18015f408ccdec15ca87 100644
--- a/init/main.c
+++ b/init/main.c
@@ -242,6 +242,14 @@ main (int argc,
NIH_MUST (nih_signal_add_handler (NULL, SIGUSR1, usr1_handler, NULL));
#endif /* DEBUG */
+ /* Start performance logging using these hardcoded files.
+ * TODO(kmixter): We'll want to make the files and fields
+ * configurable eventually.
+ */
+ perf_log_set_files ("/proc/uptime",
+ "/sys/block/sda/stat",
+ "/var/log/perf.log");
+
/* Watch children for events */
NIH_MUST (nih_child_add_watch (NULL, -1, NIH_CHILD_ALL,
« no previous file with comments | « init/job.c ('k') | init/perf_log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698