Ignore:
Timestamp:
Apr 18, 2008, 2:49:56 PM (17 years ago)
Author:
[email protected]
Message:

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

Reviewed by Sam and Adam.

-<rdar://problem/5770054> JavaScript profiler (10928)

  • Cleaned up the header file and made some functions static, added a new, sane, printing function, and fixed a few minor bugs.
  • JavaScriptCore.exp:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • profiler/FunctionCallProfile.cpp: (KJS::FunctionCallProfile::didExecute): Removed assertion that time is

    0 because at ms resolution that may not be true and only cross-

    platform way to get time differences is in ms. (KJS::FunctionCallProfile::printDataInspectorStyle): Added a new printing function for dumping data in a sane style. (KJS::FunctionCallProfile::printDataSampleStyle): Fixed a bug where we displayed too much precision when printing our floats. Also added logic to make sure we don't display 0 because that doesn't make sense for a sampling profile.
  • profiler/FunctionCallProfile.h:
  • profiler/Profiler.cpp: Moved functions that could be static into the implementation, and chaned the ASSERTs to early returns. I did this because console.profile() is a JS function and so was being profiled but asserting because the profiler had not been started! In the future I would like to put the ASSERTs back and not profile the calls to console.profile() and console.profileEnd(). (KJS::Profiler::willExecute): (KJS::Profiler::didExecute): (KJS::getStackNames): Fixed a bug where the wrong ExecState was being used. (KJS::getFunctionName): (KJS::Profiler::printDataInspectorStyle):
  • profiler/Profiler.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r31949 r32228  
    188188                93F0B3AC09BB4DC00068FCE3 /* Parser.h in Headers */ = {isa = PBXBuildFile; fileRef = 93F0B3AA09BB4DC00068FCE3 /* Parser.h */; settings = {ATTRIBUTES = (Private, ); }; };
    189189                95AB83420DA4322500BC83F3 /* Profiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95AB832E0DA42CAD00BC83F3 /* Profiler.cpp */; };
    190                 95AB83480DA432EB00BC83F3 /* Profiler.h in Headers */ = {isa = PBXBuildFile; fileRef = 95AB832F0DA42CAD00BC83F3 /* Profiler.h */; };
     190                95AB83480DA432EB00BC83F3 /* Profiler.h in Headers */ = {isa = PBXBuildFile; fileRef = 95AB832F0DA42CAD00BC83F3 /* Profiler.h */; settings = {ATTRIBUTES = (Private, ); }; };
    191191                95AB83560DA43C3000BC83F3 /* FunctionCallProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95AB83540DA43B4400BC83F3 /* FunctionCallProfile.cpp */; };
    192                 95AB83570DA43C3000BC83F3 /* FunctionCallProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 95AB83550DA43B4400BC83F3 /* FunctionCallProfile.h */; };
     192                95AB83570DA43C3000BC83F3 /* FunctionCallProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 95AB83550DA43B4400BC83F3 /* FunctionCallProfile.h */; settings = {ATTRIBUTES = (Private, ); }; };
    193193                95C18D490C90E82600E72F73 /* JSRetainPtr.h in Headers */ = {isa = PBXBuildFile; fileRef = 95C18D3E0C90E7EF00E72F73 /* JSRetainPtr.h */; settings = {ATTRIBUTES = (Private, ); }; };
    194194                A8E894320CD0602400367179 /* JSCallbackObjectFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = A8E894310CD0602400367179 /* JSCallbackObjectFunctions.h */; };
Note: See TracChangeset for help on using the changeset viewer.