Ignore:
Timestamp:
May 1, 2008, 9:32:32 AM (17 years ago)
Author:
[email protected]
Message:

2008-05-01 Kevin McCullough <[email protected]>

Reviewed by Darin.

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

  • Fix "sample" output so that it can be imported into Instruments
  • Also keep track of number of times a function is profiled.
  • JavaScriptCore.xcodeproj/project.pbxproj: Add StrHash.h which needed to be pulled out of identifier.cpp so that it could be used by the profiler and identifiers.
  • kjs/identifier.cpp: Ditto.
  • profiler/FunctionCallProfile.cpp: (KJS::FunctionCallProfile::printDataInspectorStyle): Inspector style printing should show microseconds. (KJS::FunctionCallProfile::printDataSampleStyle): Sample style printing now counts the number of times a function is in the stack tree and does not print microseconds since that does not make sense for a sampler.
  • profiler/FunctionCallProfile.h: Keep track of number of times a function is profiled. (KJS::FunctionCallProfile::numberOfCalls):
  • profiler/Profiler.cpp: (KJS::functionNameCountPairComparator): Comparator for sort function in printDataSampleStyle. (KJS::Profiler::printDataSampleStyle): Print the number of times that a function is listed in the stack tree in order of most times listed.
  • wtf/HashCountedSet.h: Added copyToVector since it didn't exist and is a more standard way to copy a HashSet to a Vector. I added on variant that takes a pair as the Vector's type and so the HashCountedSet simply fills in that pair with its internal pair, and another variant that takes a Vector of the type of the HashCountedSet and only fills in the Vector with the first element of the pair. (WTF::copyToVector):
  • wtf/StrHash.h: Added. (WTF::):
File:
1 edited

Legend:

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

    r32587 r32760  
    186186                93E26BFE08B151D400F85226 /* ucpinternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E26BFC08B151D400F85226 /* ucpinternal.h */; };
    187187                93F0B3AC09BB4DC00068FCE3 /* Parser.h in Headers */ = {isa = PBXBuildFile; fileRef = 93F0B3AA09BB4DC00068FCE3 /* Parser.h */; settings = {ATTRIBUTES = (Private, ); }; };
     188                958D85830DC93230008ABF27 /* StrHash.h in Headers */ = {isa = PBXBuildFile; fileRef = 958D85820DC93230008ABF27 /* StrHash.h */; };
    188189                95AB83420DA4322500BC83F3 /* Profiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95AB832E0DA42CAD00BC83F3 /* Profiler.cpp */; };
    189190                95AB83480DA432EB00BC83F3 /* Profiler.h in Headers */ = {isa = PBXBuildFile; fileRef = 95AB832F0DA42CAD00BC83F3 /* Profiler.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    493494                93F0B3AA09BB4DC00068FCE3 /* Parser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Parser.h; sourceTree = "<group>"; };
    494495                93F1981A08245AAE001E9ABC /* keywords.table */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = text; path = keywords.table; sourceTree = "<group>"; tabWidth = 8; };
     496                958D85820DC93230008ABF27 /* StrHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StrHash.h; sourceTree = "<group>"; };
    495497                95AB832E0DA42CAD00BC83F3 /* Profiler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Profiler.cpp; path = profiler/Profiler.cpp; sourceTree = "<group>"; };
    496498                95AB832F0DA42CAD00BC83F3 /* Profiler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Profiler.h; path = profiler/Profiler.h; sourceTree = "<group>"; };
     
    821823                                6592C316098B7DE10003D4F6 /* Vector.h */,
    822824                                6592C317098B7DE10003D4F6 /* VectorTraits.h */,
     825                                958D85820DC93230008ABF27 /* StrHash.h */,
    823826                        );
    824827                        path = wtf;
     
    11411144                                E1B7C8BE0DA3A3360074B0DC /* ThreadSpecific.h in Headers */,
    11421145                                06D358B20DAADA93003B174E /* MainThread.h in Headers */,
     1146                                958D85830DC93230008ABF27 /* StrHash.h in Headers */,
    11431147                        );
    11441148                        runOnlyForDeploymentPostprocessing = 0;
Note: See TracChangeset for help on using the changeset viewer.