Commit 7d4208ae authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[cctest] Add V8_EXPORT_PRIVATE for cctest (profiler part)

Bug: v8:9020

Change-Id: I851e9a18eab0812e009d323cd98814bebc83f003
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541047
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60487}
parent fe3a83f2
......@@ -26,7 +26,7 @@ namespace sampler {
// (if used for profiling) the program counter and stack pointer for
// the thread that created it.
class Sampler {
class V8_EXPORT_PRIVATE Sampler {
public:
static const int kMaxFramesCountLog2 = 8;
static const unsigned kMaxFramesCount = (1u << kMaxFramesCountLog2) - 1;
......@@ -96,7 +96,7 @@ typedef std::atomic_bool AtomicMutex;
// A helper that uses an std::atomic_bool to create a lock that is obtained on
// construction and released on destruction.
class AtomicGuard {
class V8_EXPORT_PRIVATE AtomicGuard {
public:
// Attempt to obtain the lock represented by |atomic|. |is_blocking|
// determines whether we will block to obtain the lock, or only make one
......@@ -118,7 +118,7 @@ class AtomicGuard {
// SamplerManager keeps a list of Samplers per thread, and allows the caller to
// take a sample for every Sampler on the current thread.
class SamplerManager {
class V8_EXPORT_PRIVATE SamplerManager {
public:
typedef std::vector<Sampler*> SamplerList;
......
......@@ -61,7 +61,7 @@ class AllocationTraceTree {
AllocationTraceNode* AddPathFromEnd(const Vector<unsigned>& path);
AllocationTraceNode* root() { return &root_; }
unsigned next_node_id() { return next_node_id_++; }
void Print(AllocationTracker* tracker);
V8_EXPORT_PRIVATE void Print(AllocationTracker* tracker);
private:
unsigned next_node_id_;
......@@ -70,8 +70,7 @@ class AllocationTraceTree {
DISALLOW_COPY_AND_ASSIGN(AllocationTraceTree);
};
class AddressToTraceMap {
class V8_EXPORT_PRIVATE AddressToTraceMap {
public:
void AddRange(Address addr, int size, unsigned node_id);
unsigned GetTraceNodeId(Address addr);
......@@ -110,7 +109,7 @@ class AllocationTracker {
AllocationTracker(HeapObjectsMap* ids, StringsStorage* names);
~AllocationTracker();
void PrepareForSerialization();
V8_EXPORT_PRIVATE void PrepareForSerialization();
void AllocationEvent(Address addr, int size);
AllocationTraceTree* trace_tree() { return &trace_tree_; }
......
......@@ -132,7 +132,8 @@ class CodeEventsContainer {
// This class implements both the profile events processor thread and
// methods called by event producers: VM and stack sampler threads.
class ProfilerEventsProcessor : public base::Thread, public CodeEventObserver {
class V8_EXPORT_PRIVATE ProfilerEventsProcessor : public base::Thread,
public CodeEventObserver {
public:
virtual ~ProfilerEventsProcessor();
......@@ -174,7 +175,8 @@ class ProfilerEventsProcessor : public base::Thread, public CodeEventObserver {
Isolate* isolate_;
};
class SamplingEventsProcessor : public ProfilerEventsProcessor {
class V8_EXPORT_PRIVATE SamplingEventsProcessor
: public ProfilerEventsProcessor {
public:
SamplingEventsProcessor(Isolate* isolate, ProfileGenerator* generator,
base::TimeDelta period);
......@@ -210,7 +212,7 @@ class SamplingEventsProcessor : public ProfilerEventsProcessor {
const base::TimeDelta period_; // Samples & code events processing period.
};
class CpuProfiler {
class V8_EXPORT_PRIVATE CpuProfiler {
public:
explicit CpuProfiler(Isolate* isolate);
......
......@@ -146,8 +146,8 @@ class HeapEntry {
const char* description, HeapEntry* child,
StringsStorage* strings);
void Print(
const char* prefix, const char* edge_name, int max_depth, int indent);
V8_EXPORT_PRIVATE void Print(const char* prefix, const char* edge_name,
int max_depth, int indent);
private:
V8_INLINE std::vector<HeapGraphEdge*>::iterator children_begin() const;
......@@ -311,7 +311,7 @@ class SnapshottingProgressReportingInterface {
};
// An implementation of V8 heap graph extractor.
class V8HeapExplorer : public HeapEntriesAllocator {
class V8_EXPORT_PRIVATE V8HeapExplorer : public HeapEntriesAllocator {
public:
V8HeapExplorer(HeapSnapshot* snapshot,
SnapshottingProgressReportingInterface* progress,
......
......@@ -29,7 +29,7 @@ struct TickSample;
// Provides a mapping from the offsets within generated code or a bytecode array
// to the source line and inlining id.
class SourcePositionTable : public Malloced {
class V8_EXPORT_PRIVATE SourcePositionTable : public Malloced {
public:
SourcePositionTable() = default;
......@@ -144,16 +144,16 @@ class CodeEntry {
}
static const char* const kWasmResourceNamePrefix;
static const char* const kEmptyResourceName;
V8_EXPORT_PRIVATE static const char* const kEmptyResourceName;
static const char* const kEmptyBailoutReason;
static const char* const kNoDeoptReason;
static const char* const kProgramEntryName;
static const char* const kIdleEntryName;
V8_EXPORT_PRIVATE static const char* const kProgramEntryName;
V8_EXPORT_PRIVATE static const char* const kIdleEntryName;
static const char* const kGarbageCollectorEntryName;
// Used to represent frames for which we have no reliable way to
// detect function.
static const char* const kUnresolvedFunctionName;
V8_EXPORT_PRIVATE static const char* const kUnresolvedFunctionName;
V8_INLINE static CodeEntry* program_entry() {
return kProgramEntry.Pointer();
......@@ -231,7 +231,7 @@ typedef std::vector<CodeEntryAndLineNumber> ProfileStackTrace;
class ProfileTree;
class ProfileNode {
class V8_EXPORT_PRIVATE ProfileNode {
public:
inline ProfileNode(ProfileTree* tree, CodeEntry* entry, ProfileNode* parent,
int line_number = 0);
......@@ -298,7 +298,7 @@ class ProfileNode {
DISALLOW_COPY_AND_ASSIGN(ProfileNode);
};
class ProfileTree {
class V8_EXPORT_PRIVATE ProfileTree {
public:
explicit ProfileTree(Isolate* isolate);
~ProfileTree();
......@@ -379,7 +379,7 @@ class CpuProfile {
void UpdateTicksScale();
void Print();
V8_EXPORT_PRIVATE void Print();
private:
void StreamPendingTraceEvents();
......@@ -400,7 +400,7 @@ class CpuProfile {
DISALLOW_COPY_AND_ASSIGN(CpuProfile);
};
class CodeMap {
class V8_EXPORT_PRIVATE CodeMap {
public:
CodeMap();
~CodeMap();
......@@ -436,7 +436,7 @@ class CodeMap {
DISALLOW_COPY_AND_ASSIGN(CodeMap);
};
class CpuProfilesCollection {
class V8_EXPORT_PRIVATE CpuProfilesCollection {
public:
explicit CpuProfilesCollection(Isolate* isolate);
......@@ -473,7 +473,7 @@ class CpuProfilesCollection {
DISALLOW_COPY_AND_ASSIGN(CpuProfilesCollection);
};
class ProfileGenerator {
class V8_EXPORT_PRIVATE ProfileGenerator {
public:
explicit ProfileGenerator(CpuProfilesCollection* profiles);
......
......@@ -23,7 +23,7 @@ class CodeEventObserver {
virtual ~CodeEventObserver() = default;
};
class ProfilerListener : public CodeEventListener {
class V8_EXPORT_PRIVATE ProfilerListener : public CodeEventListener {
public:
ProfilerListener(Isolate*, CodeEventObserver*);
~ProfilerListener() override;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment