OLD | NEW |
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 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1204 fprintf(stderr, "bzip error code: %d\n", bz2_result); | 1204 fprintf(stderr, "bzip error code: %d\n", bz2_result); |
1205 Exit(1); | 1205 Exit(1); |
1206 } | 1206 } |
1207 #endif | 1207 #endif |
1208 | 1208 |
1209 #ifndef V8_SHARED | 1209 #ifndef V8_SHARED |
1210 Shell::counter_map_ = new CounterMap(); | 1210 Shell::counter_map_ = new CounterMap(); |
1211 // Set up counters | 1211 // Set up counters |
1212 if (i::StrLength(i::FLAG_map_counters) != 0) | 1212 if (i::StrLength(i::FLAG_map_counters) != 0) |
1213 MapCounters(i::FLAG_map_counters); | 1213 MapCounters(i::FLAG_map_counters); |
1214 if (i::FLAG_dump_counters) { | 1214 if (i::FLAG_dump_counters || i::FLAG_track_gc_object_stats) { |
1215 V8::SetCounterFunction(LookupCounter); | 1215 V8::SetCounterFunction(LookupCounter); |
1216 V8::SetCreateHistogramFunction(CreateHistogram); | 1216 V8::SetCreateHistogramFunction(CreateHistogram); |
1217 V8::SetAddHistogramSampleFunction(AddHistogramSample); | 1217 V8::SetAddHistogramSampleFunction(AddHistogramSample); |
1218 } | 1218 } |
1219 #endif // V8_SHARED | 1219 #endif // V8_SHARED |
1220 if (options.test_shell) return; | 1220 if (options.test_shell) return; |
1221 | 1221 |
1222 #ifndef V8_SHARED | 1222 #ifndef V8_SHARED |
1223 Locker lock; | 1223 Locker lock; |
1224 HandleScope scope; | 1224 HandleScope scope; |
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1893 } | 1893 } |
1894 | 1894 |
1895 } // namespace v8 | 1895 } // namespace v8 |
1896 | 1896 |
1897 | 1897 |
1898 #ifndef GOOGLE3 | 1898 #ifndef GOOGLE3 |
1899 int main(int argc, char* argv[]) { | 1899 int main(int argc, char* argv[]) { |
1900 return v8::Shell::Main(argc, argv); | 1900 return v8::Shell::Main(argc, argv); |
1901 } | 1901 } |
1902 #endif | 1902 #endif |
OLD | NEW |