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

Side by Side Diff: src/objects.h

Issue 10792014: Track counts/sizes of CODE sub types with --track-gc-object-stats (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Turn flag off by default Created 8 years, 5 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
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 4168 matching lines...) Expand 10 before | Expand all | Expand 10 after
4179 public: 4179 public:
4180 // Opaque data type for encapsulating code flags like kind, inline 4180 // Opaque data type for encapsulating code flags like kind, inline
4181 // cache state, and arguments count. 4181 // cache state, and arguments count.
4182 // FLAGS_MIN_VALUE and FLAGS_MAX_VALUE are specified to ensure that 4182 // FLAGS_MIN_VALUE and FLAGS_MAX_VALUE are specified to ensure that
4183 // enumeration type has correct value range (see Issue 830 for more details). 4183 // enumeration type has correct value range (see Issue 830 for more details).
4184 enum Flags { 4184 enum Flags {
4185 FLAGS_MIN_VALUE = kMinInt, 4185 FLAGS_MIN_VALUE = kMinInt,
4186 FLAGS_MAX_VALUE = kMaxInt 4186 FLAGS_MAX_VALUE = kMaxInt
4187 }; 4187 };
4188 4188
4189 #define CODE_KIND_LIST(V) \
4190 V(FUNCTION) \
4191 V(OPTIMIZED_FUNCTION) \
4192 V(STUB) \
4193 V(BUILTIN) \
4194 V(LOAD_IC) \
4195 V(KEYED_LOAD_IC) \
4196 V(CALL_IC) \
4197 V(KEYED_CALL_IC) \
4198 V(STORE_IC) \
4199 V(KEYED_STORE_IC) \
4200 V(UNARY_OP_IC) \
4201 V(BINARY_OP_IC) \
4202 V(COMPARE_IC) \
4203 V(TO_BOOLEAN_IC)
4204
4189 enum Kind { 4205 enum Kind {
4190 FUNCTION, 4206 #define DEFINE_CODE_KIND_ENUM(name) name,
4191 OPTIMIZED_FUNCTION, 4207 CODE_KIND_LIST(DEFINE_CODE_KIND_ENUM)
4192 STUB, 4208 #undef DEFINE_CODE_KIND_ENUM
4193 BUILTIN,
4194 LOAD_IC,
4195 KEYED_LOAD_IC,
4196 CALL_IC,
4197 KEYED_CALL_IC,
4198 STORE_IC,
4199 KEYED_STORE_IC,
4200 UNARY_OP_IC,
4201 BINARY_OP_IC,
4202 COMPARE_IC,
4203 TO_BOOLEAN_IC,
4204 // No more than 16 kinds. The value currently encoded in four bits in
4205 // Flags.
4206 4209
4207 // Pseudo-kinds. 4210 // Pseudo-kinds.
4211 LAST_CODE_KIND = TO_BOOLEAN_IC,
4208 REGEXP = BUILTIN, 4212 REGEXP = BUILTIN,
4209 FIRST_IC_KIND = LOAD_IC, 4213 FIRST_IC_KIND = LOAD_IC,
4210 LAST_IC_KIND = TO_BOOLEAN_IC 4214 LAST_IC_KIND = TO_BOOLEAN_IC
4211 }; 4215 };
4212 4216
4217 // No more than 16 kinds. The value currently encoded in four bits in
Michael Starzinger 2012/07/17 10:48:16 There is an "is" missing in the comment.
danno 2012/07/17 11:57:10 Done.
4218 // Flags.
4219 STATIC_ASSERT(LAST_CODE_KIND < 16);
4220
4213 // Types of stubs. 4221 // Types of stubs.
4214 enum StubType { 4222 enum StubType {
4215 NORMAL, 4223 NORMAL,
4216 FIELD, 4224 FIELD,
4217 CONSTANT_FUNCTION, 4225 CONSTANT_FUNCTION,
4218 CALLBACKS, 4226 CALLBACKS,
4219 INTERCEPTOR, 4227 INTERCEPTOR,
4220 MAP_TRANSITION, 4228 MAP_TRANSITION,
4221 NONEXISTENT 4229 NONEXISTENT
4222 }; 4230 };
(...skipping 4666 matching lines...) Expand 10 before | Expand all | Expand 10 after
8889 } else { 8897 } else {
8890 value &= ~(1 << bit_position); 8898 value &= ~(1 << bit_position);
8891 } 8899 }
8892 return value; 8900 return value;
8893 } 8901 }
8894 }; 8902 };
8895 8903
8896 } } // namespace v8::internal 8904 } } // namespace v8::internal
8897 8905
8898 #endif // V8_OBJECTS_H_ 8906 #endif // V8_OBJECTS_H_
OLDNEW
« src/mark-compact.cc ('K') | « src/mark-compact.cc ('k') | src/v8-counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698