Ignore:
Timestamp:
Apr 24, 2008, 10:20:01 AM (17 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2008-04-24 Kevin McCullough <[email protected]>

Reviewed by Adam and Sam.

-<rdar://problem/5770054> JavaScript profiler (10928)
-Only profile the page group that starts profiling to avoid profiling
tools that shouldn't be profiled unless explicitly requested to.

  • JavaScriptCore.exp: Export new signature.
  • kjs/JSGlobalObject.cpp: Add unique identifiers to the JSGlobalObject. (KJS::JSGlobalObject::init):
  • kjs/JSGlobalObject.h: Ditto. (KJS::JSGlobalObject::setPageGroupIdentifier): (KJS::JSGlobalObject::pageGroupIdentifier):
  • profiler/Profiler.cpp: Check the identifier of the page group of the lexical global exec state and only profile if it matches the given page group identifier. (KJS::Profiler::startProfiling): (KJS::Profiler::willExecute): (KJS::Profiler::didExecute):
  • profiler/Profiler.h: Ditto. (KJS::Profiler::Profiler):

WebCore:

2008-04-24 Kevin McCullough <[email protected]>

Reviewed by Adam and Sam.

-<rdar://problem/5770054> JavaScript profiler (10928)
-Only profile the page group that starts profiling to avoid profiling
tools that shouldn't be profiled unless explicitly requested to.

  • bindings/js/kjs_proxy.cpp: When a new global object is created set its page group identifier. (WebCore::KJSProxy::clear): (WebCore::KJSProxy::initScript):
  • page/Console.cpp: When calling console.profile set the identifier of the page group being profiled. (WebCore::Console::profile):
  • page/PageGroup.cpp: Implement unique identifiers. (WebCore::getUniqueIdentifier): (WebCore::PageGroup::PageGroup):
  • page/PageGroup.h: Ditto. (WebCore::PageGroup::identifier):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/JSGlobalObject.h

    r31962 r32495  
    138138            ActivationStackNode* activations;
    139139            size_t activationCount;
     140           
     141            unsigned pageGroupIdentifier;
    140142
    141143            OwnPtr<HashSet<JSObject*> > arrayVisitedElements; // Global data shared by array prototype functions.
     
    210212        NativeErrorPrototype* URIErrorPrototype() const { return d()->URIErrorPrototype; }
    211213
     214        void setPageGroupIdentifier(unsigned value) { d()->pageGroupIdentifier = value; }
     215        unsigned pageGroupIdentifier() const { return d()->pageGroupIdentifier; }
     216
    212217        void saveBuiltins(SavedBuiltins&) const;
    213218        void restoreBuiltins(const SavedBuiltins&);
Note: See TracChangeset for help on using the changeset viewer.