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

Side by Side Diff: src/platform-linux.cc

Issue 13582007: MIPS: ARM: Log an error if /proc/cpuinfo cannot be opened (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 case FPU: 265 case FPU:
266 search_string = "FPU"; 266 search_string = "FPU";
267 break; 267 break;
268 default: 268 default:
269 UNREACHABLE(); 269 UNREACHABLE();
270 } 270 }
271 271
272 FILE* f = NULL; 272 FILE* f = NULL;
273 const char* what = search_string; 273 const char* what = search_string;
274 274
275 if (NULL == (f = fopen(file_name, "r"))) 275 if (NULL == (f = fopen(file_name, "r"))) {
276 OS::PrintError("Failed to open /proc/cpuinfo\n");
276 return false; 277 return false;
278 }
277 279
278 int k; 280 int k;
279 while (EOF != (k = fgetc(f))) { 281 while (EOF != (k = fgetc(f))) {
280 if (k == *what) { 282 if (k == *what) {
281 ++what; 283 ++what;
282 while ((*what != '\0') && (*what == fgetc(f))) { 284 while ((*what != '\0') && (*what == fgetc(f))) {
283 ++what; 285 ++what;
284 } 286 }
285 if (*what == '\0') { 287 if (*what == '\0') {
286 fclose(f); 288 fclose(f);
(...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after
1327 1329
1328 1330
1329 void Sampler::Stop() { 1331 void Sampler::Stop() {
1330 ASSERT(IsActive()); 1332 ASSERT(IsActive());
1331 SignalSender::RemoveActiveSampler(this); 1333 SignalSender::RemoveActiveSampler(this);
1332 SetActive(false); 1334 SetActive(false);
1333 } 1335 }
1334 1336
1335 1337
1336 } } // namespace v8::internal 1338 } } // 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