Ignore:
Timestamp:
Aug 14, 2008, 11:11:20 AM (17 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2008-08-14 Kevin McCullough <[email protected]>

Reviewed by Tim.

<rdar://problem/6115819> Notify of profile in console

  • Profiles now have a unique ID so that they can be linked to the console message that announces that a profile completed.
  • profiler/HeavyProfile.cpp: (KJS::HeavyProfile::HeavyProfile):
  • profiler/Profile.cpp: (KJS::Profile::create): (KJS::Profile::Profile):
  • profiler/Profile.h: (KJS::Profile::uid):
  • profiler/ProfileGenerator.cpp: (KJS::ProfileGenerator::create): (KJS::ProfileGenerator::ProfileGenerator):
  • profiler/ProfileGenerator.h:
  • profiler/Profiler.cpp: (KJS::Profiler::startProfiling):
  • profiler/TreeProfile.cpp: (KJS::TreeProfile::create): (KJS::TreeProfile::TreeProfile):
  • profiler/TreeProfile.h:

WebCore:

2008-08-14 Kevin McCullough <[email protected]>

Reviewed by Tim.

<rdar://problem/6115819> Notify of profile in console

  • page/InspectorController.cpp: (WebCore::InspectorController::addProfile): (WebCore::InspectorController::addProfileMessageToConsole): Called by addProfile this is the function that adds a message to the console that a profile finished.
  • page/InspectorController.h:
  • page/JavaScriptProfile.cpp: Expose the profiler's unique ID to match the console log to the profile in the web inspector. (WebCore::getUniqueIdCallback): (WebCore::ProfileClass):
  • page/inspector/ProfilesPanel.js: Created a map of all the profiles by Id to bring up the requested profile. Also select and reveal the profile in the profile panel. And created displayTitleForProfileLink() which formats a title taking into account if it's user initiated or if there are multiples. Lasty, I put the user initiated profile in a variable.
  • page/inspector/inspector.js: Make the profile title be a clickable link that will take the user to the identified profile. Also expose the count of user initiated profiles so they can be displayed in the console with the correct count.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/profiler/ProfileGenerator.cpp

    r35184 r35756  
    3434static const char* NonJSExecution = "(idle)";
    3535
    36 PassRefPtr<ProfileGenerator> ProfileGenerator::create(const UString& title, ExecState* originatingGlobalExec, unsigned profileGroup, ProfilerClient* client)
     36PassRefPtr<ProfileGenerator> ProfileGenerator::create(const UString& title, ExecState* originatingGlobalExec, unsigned profileGroup, ProfilerClient* client, unsigned uid)
    3737{
    38     return adoptRef(new ProfileGenerator(title, originatingGlobalExec, profileGroup, client));
     38    return adoptRef(new ProfileGenerator(title, originatingGlobalExec, profileGroup, client, uid));
    3939}
    4040
    41 ProfileGenerator::ProfileGenerator(const UString& title, ExecState* originatingGlobalExec, unsigned profileGroup, ProfilerClient* client)
     41ProfileGenerator::ProfileGenerator(const UString& title, ExecState* originatingGlobalExec, unsigned profileGroup, ProfilerClient* client, unsigned uid)
    4242    : m_originatingGlobalExec(originatingGlobalExec)
    4343    , m_profileGroup(profileGroup)
     
    4646    , m_stoppedCallDepth(0)
    4747{
    48     m_profile = Profile::create(title);
     48    m_profile = Profile::create(title, uid);
    4949    m_currentNode = m_head = m_profile->head();
    5050}
Note: See TracChangeset for help on using the changeset viewer.