| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 22 matching lines...) Expand all Loading... |
| 33 #include <map> | 33 #include <map> |
| 34 | 34 |
| 35 #include "v8.h" | 35 #include "v8.h" |
| 36 | 36 |
| 37 #include "bootstrapper.h" | 37 #include "bootstrapper.h" |
| 38 #include "natives.h" | 38 #include "natives.h" |
| 39 #include "platform.h" | 39 #include "platform.h" |
| 40 #include "serialize.h" | 40 #include "serialize.h" |
| 41 #include "list.h" | 41 #include "list.h" |
| 42 | 42 |
| 43 // use explicit namespace to avoid clashing with types in namespace v8 | |
| 44 namespace i = v8::internal; | |
| 45 using namespace v8; | 43 using namespace v8; |
| 46 | 44 |
| 47 static const unsigned int kMaxCounters = 256; | 45 static const unsigned int kMaxCounters = 256; |
| 48 | 46 |
| 49 // A single counter in a counter collection. | 47 // A single counter in a counter collection. |
| 50 class Counter { | 48 class Counter { |
| 51 public: | 49 public: |
| 52 static const int kMaxNameSize = 64; | 50 static const int kMaxNameSize = 64; |
| 53 int32_t* Bind(const char* name) { | 51 int32_t* Bind(const char* name) { |
| 54 int i; | 52 int i; |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 sink.WriteSpaceUsed( | 351 sink.WriteSpaceUsed( |
| 354 partial_ser.CurrentAllocationAddress(i::NEW_SPACE), | 352 partial_ser.CurrentAllocationAddress(i::NEW_SPACE), |
| 355 partial_ser.CurrentAllocationAddress(i::OLD_POINTER_SPACE), | 353 partial_ser.CurrentAllocationAddress(i::OLD_POINTER_SPACE), |
| 356 partial_ser.CurrentAllocationAddress(i::OLD_DATA_SPACE), | 354 partial_ser.CurrentAllocationAddress(i::OLD_DATA_SPACE), |
| 357 partial_ser.CurrentAllocationAddress(i::CODE_SPACE), | 355 partial_ser.CurrentAllocationAddress(i::CODE_SPACE), |
| 358 partial_ser.CurrentAllocationAddress(i::MAP_SPACE), | 356 partial_ser.CurrentAllocationAddress(i::MAP_SPACE), |
| 359 partial_ser.CurrentAllocationAddress(i::CELL_SPACE), | 357 partial_ser.CurrentAllocationAddress(i::CELL_SPACE), |
| 360 partial_ser.CurrentAllocationAddress(i::LO_SPACE)); | 358 partial_ser.CurrentAllocationAddress(i::LO_SPACE)); |
| 361 return 0; | 359 return 0; |
| 362 } | 360 } |
| OLD | NEW |