OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include <stdio.h> | 5 #include <stdio.h> |
6 #include <stdlib.h> | 6 #include <stdlib.h> |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include "include/dart_api.h" | 9 #include "include/dart_api.h" |
10 #include "include/dart_tools_api.h" | 10 #include "include/dart_tools_api.h" |
(...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1353 int64_t data[File::kStatSize]; | 1353 int64_t data[File::kStatSize]; |
1354 File::Stat(url + 7, data); | 1354 File::Stat(url + 7, data); |
1355 if (data[File::kType] == File::kDoesNotExist) { | 1355 if (data[File::kType] == File::kDoesNotExist) { |
1356 return true; | 1356 return true; |
1357 } | 1357 } |
1358 bool modified = data[File::kModifiedTime] > since; | 1358 bool modified = data[File::kModifiedTime] > since; |
1359 return modified; | 1359 return modified; |
1360 } | 1360 } |
1361 | 1361 |
1362 static void EmbedderInformationCallback(Dart_EmbedderInformation* info) { | 1362 static void EmbedderInformationCallback(Dart_EmbedderInformation* info) { |
1363 int64_t max_rss = Process::MaxRSS(); | |
1364 int64_t current_rss = Process::CurrentRSS(); | |
1365 | |
1366 info->version = DART_EMBEDDER_INFORMATION_CURRENT_VERSION; | 1363 info->version = DART_EMBEDDER_INFORMATION_CURRENT_VERSION; |
1367 info->name = "Dart VM"; | 1364 info->name = "Dart VM"; |
1368 info->max_rss = max_rss >= 0 ? max_rss : 0; | 1365 Process::GetRSSInformation(&(info->max_rss), &(info->current_rss)); |
1369 info->current_rss = current_rss >= 0 ? current_rss : 0; | |
1370 } | 1366 } |
1371 | 1367 |
1372 static void GenerateAppAOTSnapshot() { | 1368 static void GenerateAppAOTSnapshot() { |
1373 if (use_blobs) { | 1369 if (use_blobs) { |
1374 Snapshot::GenerateAppAOTAsBlobs(snapshot_filename); | 1370 Snapshot::GenerateAppAOTAsBlobs(snapshot_filename); |
1375 } else { | 1371 } else { |
1376 Snapshot::GenerateAppAOTAsAssembly(snapshot_filename); | 1372 Snapshot::GenerateAppAOTAsAssembly(snapshot_filename); |
1377 } | 1373 } |
1378 } | 1374 } |
1379 | 1375 |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1859 Platform::Exit(Process::GlobalExitCode()); | 1855 Platform::Exit(Process::GlobalExitCode()); |
1860 } | 1856 } |
1861 | 1857 |
1862 } // namespace bin | 1858 } // namespace bin |
1863 } // namespace dart | 1859 } // namespace dart |
1864 | 1860 |
1865 int main(int argc, char** argv) { | 1861 int main(int argc, char** argv) { |
1866 dart::bin::main(argc, argv); | 1862 dart::bin::main(argc, argv); |
1867 UNREACHABLE(); | 1863 UNREACHABLE(); |
1868 } | 1864 } |
OLD | NEW |