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

Side by Side Diff: src/profile-generator-inl.h

Issue 6614010: [Isolates] Merge 6700:7030 from bleeding_edge to isolates. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 years, 9 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 | « src/profile-generator.cc ('k') | src/regexp-macro-assembler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 27 matching lines...) Expand all
38 const char* StringsStorage::GetFunctionName(String* name) { 38 const char* StringsStorage::GetFunctionName(String* name) {
39 return GetFunctionName(GetName(name)); 39 return GetFunctionName(GetName(name));
40 } 40 }
41 41
42 42
43 const char* StringsStorage::GetFunctionName(const char* name) { 43 const char* StringsStorage::GetFunctionName(const char* name) {
44 return strlen(name) > 0 ? name : ProfileGenerator::kAnonymousFunctionName; 44 return strlen(name) > 0 ? name : ProfileGenerator::kAnonymousFunctionName;
45 } 45 }
46 46
47 47
48 CodeEntry::CodeEntry(int security_token_id)
49 : tag_(Logger::FUNCTION_TAG),
50 name_prefix_(kEmptyNamePrefix),
51 name_(""),
52 resource_name_(""),
53 line_number_(0),
54 security_token_id_(security_token_id) {
55 }
56
57
58 CodeEntry::CodeEntry(Logger::LogEventsAndTags tag, 48 CodeEntry::CodeEntry(Logger::LogEventsAndTags tag,
59 const char* name_prefix, 49 const char* name_prefix,
60 const char* name, 50 const char* name,
61 const char* resource_name, 51 const char* resource_name,
62 int line_number, 52 int line_number,
63 int security_token_id) 53 int security_token_id)
64 : tag_(tag), 54 : tag_(tag),
65 name_prefix_(name_prefix), 55 name_prefix_(name_prefix),
66 name_(name), 56 name_(name),
67 resource_name_(resource_name), 57 resource_name_(resource_name),
68 line_number_(line_number), 58 line_number_(line_number),
59 shared_id_(0),
69 security_token_id_(security_token_id) { 60 security_token_id_(security_token_id) {
70 } 61 }
71 62
72 63
73 bool CodeEntry::is_js_function_tag(Logger::LogEventsAndTags tag) { 64 bool CodeEntry::is_js_function_tag(Logger::LogEventsAndTags tag) {
74 return tag == Logger::FUNCTION_TAG 65 return tag == Logger::FUNCTION_TAG
75 || tag == Logger::LAZY_COMPILE_TAG 66 || tag == Logger::LAZY_COMPILE_TAG
76 || tag == Logger::SCRIPT_TAG 67 || tag == Logger::SCRIPT_TAG
77 || tag == Logger::NATIVE_FUNCTION_TAG 68 || tag == Logger::NATIVE_FUNCTION_TAG
78 || tag == Logger::NATIVE_LAZY_COMPILE_TAG 69 || tag == Logger::NATIVE_LAZY_COMPILE_TAG
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 114
124 115
125 uint64_t HeapEntry::id() { 116 uint64_t HeapEntry::id() {
126 union { 117 union {
127 Id stored_id; 118 Id stored_id;
128 uint64_t returned_id; 119 uint64_t returned_id;
129 } id_adaptor = {id_}; 120 } id_adaptor = {id_};
130 return id_adaptor.returned_id; 121 return id_adaptor.returned_id;
131 } 122 }
132 123
133
134 template<class Visitor>
135 void HeapEntriesMap::UpdateEntries(Visitor* visitor) {
136 for (HashMap::Entry* p = entries_.Start();
137 p != NULL;
138 p = entries_.Next(p)) {
139 EntryInfo* entry_info = reinterpret_cast<EntryInfo*>(p->value);
140 entry_info->entry = visitor->GetEntry(
141 reinterpret_cast<HeapObject*>(p->key),
142 entry_info->children_count,
143 entry_info->retainers_count);
144 entry_info->children_count = 0;
145 entry_info->retainers_count = 0;
146 }
147 }
148
149
150 bool HeapSnapshotGenerator::ReportProgress(bool force) {
151 const int kProgressReportGranularity = 10000;
152 if (control_ != NULL
153 && (force || progress_counter_ % kProgressReportGranularity == 0)) {
154 return
155 control_->ReportProgressValue(progress_counter_, progress_total_) ==
156 v8::ActivityControl::kContinue;
157 }
158 return true;
159 }
160
161 } } // namespace v8::internal 124 } } // namespace v8::internal
162 125
163 #endif // ENABLE_LOGGING_AND_PROFILING 126 #endif // ENABLE_LOGGING_AND_PROFILING
164 127
165 #endif // V8_PROFILE_GENERATOR_INL_H_ 128 #endif // V8_PROFILE_GENERATOR_INL_H_
OLDNEW
« no previous file with comments | « src/profile-generator.cc ('k') | src/regexp-macro-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698