chromium/v8/src/heap/code-stats.cc

// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "src/heap/code-stats.h"

#include "src/codegen/code-comments.h"
#include "src/codegen/reloc-info.h"
#include "src/heap/heap-inl.h"
#include "src/heap/large-spaces.h"
#include "src/heap/paged-spaces-inl.h"  // For PagedSpaceObjectIterator.
#include "src/objects/objects-inl.h"

namespace v8 {
namespace internal {

// Record code statistics.
void CodeStatistics::RecordCodeAndMetadataStatistics(Tagged<HeapObject> object,
                                                     Isolate* isolate) {}

void CodeStatistics::ResetCodeAndMetadataStatistics(Isolate* isolate) {}

// Collects code size statistics:
// - code and metadata size
// - by code kind (only in debug mode)
// - by code comment (only in debug mode)
void CodeStatistics::CollectCodeStatistics(PagedSpace* space,
                                           Isolate* isolate) {}

// Collects code size statistics in OldLargeObjectSpace:
// - code and metadata size
// - by code kind (only in debug mode)
// - by code comment (only in debug mode)
void CodeStatistics::CollectCodeStatistics(OldLargeObjectSpace* space,
                                           Isolate* isolate) {}

#ifdef DEBUG
void CodeStatistics::ReportCodeStatistics(Isolate* isolate) {}

void CodeStatistics::ResetCodeStatistics(Isolate* isolate) {}

// Adds comment to 'comment_statistics' table. Performance OK as long as
// 'kMaxComments' is small
void CodeStatistics::EnterComment(Isolate* isolate, const char* comment,
                                  int delta) {}

// Call for each nested comment start (start marked with '[ xxx', end marked
// with ']'.  RelocIterator 'it' must point to a comment reloc info.
void CodeStatistics::CollectCommentStatistics(Isolate* isolate,
                                              CodeCommentsIterator* cit) {}

// Collects code comment statistics.
void CodeStatistics::CollectCodeCommentStatistics(Tagged<AbstractCode> obj,
                                                  Isolate* isolate) {}
#endif

}  // namespace internal
}  // namespace v8