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

Side by Side Diff: src/code-stubs.h

Issue 16578008: Improved function entry hook coverage (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@post_fix
Patch Set: Fix Windows X64 compile warnings." Created 7 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
« no previous file with comments | « src/bootstrapper.cc ('k') | src/code-stubs.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 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 2117 matching lines...) Expand 10 before | Expand all | Expand 10 after
2128 class ProfileEntryHookStub : public PlatformCodeStub { 2128 class ProfileEntryHookStub : public PlatformCodeStub {
2129 public: 2129 public:
2130 explicit ProfileEntryHookStub() {} 2130 explicit ProfileEntryHookStub() {}
2131 2131
2132 // The profile entry hook function is not allowed to cause a GC. 2132 // The profile entry hook function is not allowed to cause a GC.
2133 virtual bool SometimesSetsUpAFrame() { return false; } 2133 virtual bool SometimesSetsUpAFrame() { return false; }
2134 2134
2135 // Generates a call to the entry hook if it's enabled. 2135 // Generates a call to the entry hook if it's enabled.
2136 static void MaybeCallEntryHook(MacroAssembler* masm); 2136 static void MaybeCallEntryHook(MacroAssembler* masm);
2137 2137
2138 // Sets or unsets the entry hook function. Returns true on success,
2139 // false on an attempt to replace a non-NULL entry hook with another
2140 // non-NULL hook.
2141 static bool SetFunctionEntryHook(FunctionEntryHook entry_hook);
2142
2143 static bool HasEntryHook() { return entry_hook_ != NULL; }
2144
2145 private: 2138 private:
2146 static void EntryHookTrampoline(intptr_t function, 2139 static void EntryHookTrampoline(intptr_t function,
2147 intptr_t stack_pointer); 2140 intptr_t stack_pointer);
2148 2141
2149 Major MajorKey() { return ProfileEntryHook; } 2142 Major MajorKey() { return ProfileEntryHook; }
2150 int MinorKey() { return 0; } 2143 int MinorKey() { return 0; }
2151 2144
2152 void Generate(MacroAssembler* masm); 2145 void Generate(MacroAssembler* masm);
2153 2146
2154 // The current function entry hook.
2155 static FunctionEntryHook entry_hook_;
2156
2157 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); 2147 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub);
2158 }; 2148 };
2159 2149
2160 } } // namespace v8::internal 2150 } } // namespace v8::internal
2161 2151
2162 #endif // V8_CODE_STUBS_H_ 2152 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698