• loislo@chromium.org's avatar
    Logger: introduce abstract interface for CodeEvent listeners. · 141ada02
    loislo@chromium.org authored
    New abstract class CodeEventListener was created.
    
    CodeEventLogger which is the base class for Jit, LowLevel
    and CodeAddressMap loggers was inherited from CodeEventListener.
    
    CodeAddressMap class was moved to serializer.cc because serializer is the only user for it. Actually it collects code names and pushes them to the standard log as SnapshotCodeNameEvent. So I extracted this code into separate function CodeNameEvent. It happens that this method works only when Serializer serializes an object. So I added direct log call there.
    
    CodeEventLogger class declaration was moved to the header
    because CodeAddressMap needs it.
    The code for the nested class CodeEventLogger::NameBuffer was left in the cc file.
    
    CpuProfiler now is inherit CodeEventListener but not used
    the loggers infrastructure yet due to the complex initialization schema. I'd like to fix that in a separate cl.
    
    BUG=none
    TEST=current test set.
    R=yangguo@chromium.org, yurys@chromium.org
    
    Review URL: https://codereview.chromium.org/19724007
    
    git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15911 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
    141ada02
serialize.h 21 KB