| Index: src/profile-generator.h
|
| diff --git a/src/profile-generator.h b/src/profile-generator.h
|
| index 411cbdbab270c700f528a7a9ecd6077b995a0210..6b02368816e540f10a45b1938822b713ab6d16e9 100644
|
| --- a/src/profile-generator.h
|
| +++ b/src/profile-generator.h
|
| @@ -37,30 +37,6 @@ namespace internal {
|
|
|
| struct OffsetRange;
|
|
|
| -class TokenEnumerator {
|
| - public:
|
| - TokenEnumerator();
|
| - ~TokenEnumerator();
|
| - int GetTokenId(Object* token);
|
| -
|
| - static const int kNoSecurityToken = -1;
|
| - static const int kInheritsSecurityToken = -2;
|
| -
|
| - private:
|
| - static void TokenRemovedCallback(v8::Isolate* isolate,
|
| - v8::Persistent<v8::Value>* handle,
|
| - void* parameter);
|
| - void TokenRemoved(Object** token_location);
|
| -
|
| - List<Object**> token_locations_;
|
| - List<bool> token_removed_;
|
| -
|
| - friend class TokenEnumeratorTester;
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(TokenEnumerator);
|
| -};
|
| -
|
| -
|
| // Provides a storage of strings allocated in C++ heap, to hold them
|
| // forever, even if they disappear from JS heap or external storage.
|
| class StringsStorage {
|
| @@ -98,7 +74,6 @@ class CodeEntry {
|
| // CodeEntry doesn't own name strings, just references them.
|
| INLINE(CodeEntry(Logger::LogEventsAndTags tag,
|
| const char* name,
|
| - int security_token_id = TokenEnumerator::kNoSecurityToken,
|
| const char* name_prefix = CodeEntry::kEmptyNamePrefix,
|
| const char* resource_name = CodeEntry::kEmptyResourceName,
|
| int line_number = v8::CpuProfileNode::kNoLineNumberInfo));
|
| @@ -113,7 +88,6 @@ class CodeEntry {
|
| INLINE(void set_shared_id(int shared_id)) { shared_id_ = shared_id; }
|
| INLINE(int script_id() const) { return script_id_; }
|
| INLINE(void set_script_id(int script_id)) { script_id_ = script_id; }
|
| - INLINE(int security_token_id() const) { return security_token_id_; }
|
|
|
| INLINE(static bool is_js_function_tag(Logger::LogEventsAndTags tag));
|
|
|
| @@ -141,7 +115,6 @@ class CodeEntry {
|
| int line_number_;
|
| int shared_id_;
|
| int script_id_;
|
| - int security_token_id_;
|
| List<OffsetRange>* no_frame_ranges_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(CodeEntry);
|
| @@ -201,7 +174,6 @@ class ProfileTree {
|
| ProfileNode* AddPathFromEnd(const Vector<CodeEntry*>& path);
|
| void AddPathFromStart(const Vector<CodeEntry*>& path);
|
| void CalculateTotalTicks();
|
| - void FilteredClone(ProfileTree* src, int security_token_id);
|
|
|
| double TicksToMillis(unsigned ticks) const {
|
| return ticks * ms_to_ticks_scale_;
|
| @@ -238,7 +210,6 @@ class CpuProfile {
|
| void AddPath(const Vector<CodeEntry*>& path);
|
| void CalculateTotalTicks();
|
| void SetActualSamplingRate(double actual_sampling_rate);
|
| - CpuProfile* FilteredClone(int security_token_id);
|
|
|
| INLINE(const char* title() const) { return title_; }
|
| INLINE(unsigned uid() const) { return uid_; }
|
| @@ -315,10 +286,8 @@ class CpuProfilesCollection {
|
| ~CpuProfilesCollection();
|
|
|
| bool StartProfiling(const char* title, unsigned uid, bool record_samples);
|
| - CpuProfile* StopProfiling(int security_token_id,
|
| - const char* title,
|
| - double actual_sampling_rate);
|
| - List<CpuProfile*>* Profiles(int security_token_id);
|
| + CpuProfile* StopProfiling(const char* title, double actual_sampling_rate);
|
| + List<CpuProfile*>* profiles() { return &finished_profiles_; }
|
| const char* GetName(Name* name) {
|
| return function_and_resource_names_.GetName(name);
|
| }
|
| @@ -331,15 +300,12 @@ class CpuProfilesCollection {
|
| const char* GetFunctionName(const char* name) {
|
| return function_and_resource_names_.GetFunctionName(name);
|
| }
|
| - CpuProfile* GetProfile(int security_token_id, unsigned uid);
|
| bool IsLastProfile(const char* title);
|
| void RemoveProfile(CpuProfile* profile);
|
| - bool HasDetachedProfiles() { return detached_profiles_.length() > 0; }
|
|
|
| CodeEntry* NewCodeEntry(
|
| Logger::LogEventsAndTags tag,
|
| const char* name,
|
| - int security_token_id = TokenEnumerator::kNoSecurityToken,
|
| const char* name_prefix = CodeEntry::kEmptyNamePrefix,
|
| const char* resource_name = CodeEntry::kEmptyResourceName,
|
| int line_number = v8::CpuProfileNode::kNoLineNumberInfo);
|
| @@ -351,21 +317,9 @@ class CpuProfilesCollection {
|
| static const int kMaxSimultaneousProfiles = 100;
|
|
|
| private:
|
| - int GetProfileIndex(unsigned uid);
|
| - List<CpuProfile*>* GetProfilesList(int security_token_id);
|
| - int TokenToIndex(int security_token_id);
|
| -
|
| - INLINE(static bool UidsMatch(void* key1, void* key2)) {
|
| - return key1 == key2;
|
| - }
|
| -
|
| StringsStorage function_and_resource_names_;
|
| List<CodeEntry*> code_entries_;
|
| - List<List<CpuProfile*>* > profiles_by_token_;
|
| - // Mapping from profiles' uids to indexes in the second nested list
|
| - // of profiles_by_token_.
|
| - HashMap profiles_uids_;
|
| - List<CpuProfile*> detached_profiles_;
|
| + List<CpuProfile*> finished_profiles_;
|
|
|
| // Accessed by VM thread and profile generator thread.
|
| List<CpuProfile*> current_profiles_;
|
|
|