Rename old PERFETTO_EXPORT into PERFETTO_EXPORT_COMPONENT
In adaabb6d516c("Rename PERFETTO_EXPORT to PERFETTO_COMPONENT_EXPORT"),
I didn't realize that PERFETTO_COMPONENT_EXPORT was already used (inside
the perfetto repo) for chromium builds.
This changes the name to PERFETTO_EXPORT_COMPONENT instead.
Change-Id: Iecbe82e21e6cd2c51abc97028cc77071b8a1c9a0
diff --git a/docs/design-docs/api-and-abi.md b/docs/design-docs/api-and-abi.md
index 8e6a639..e24624a 100644
--- a/docs/design-docs/api-and-abi.md
+++ b/docs/design-docs/api-and-abi.md
@@ -497,7 +497,7 @@
different linker unit. It is fine to link AND use the client library within
the same shared library, as long as none of the perfetto C++ API is exported.
-The `PERFETTO_COMPONENT_EXPORT` annotations are only used when building the
+The `PERFETTO_EXPORT_COMPONENT` annotations are only used when building the
third tier of the client library in chromium component builds and cannot be
easily repurposed for delineating shared library boundaries for the other two
API tiers.
diff --git a/include/perfetto/base/export.h b/include/perfetto/base/export.h
index 4ebda82..7036f65 100644
--- a/include/perfetto/base/export.h
+++ b/include/perfetto/base/export.h
@@ -24,24 +24,24 @@
#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN)
#if defined(PERFETTO_IMPLEMENTATION)
-#define PERFETTO_COMPONENT_EXPORT __declspec(dllexport)
+#define PERFETTO_EXPORT_COMPONENT __declspec(dllexport)
#else
-#define PERFETTO_COMPONENT_EXPORT __declspec(dllimport)
+#define PERFETTO_EXPORT_COMPONENT __declspec(dllimport)
#endif
#else // PERFETTO_BUILDFLAG(PERFETTO_OS_WIN)
#if defined(PERFETTO_IMPLEMENTATION)
-#define PERFETTO_COMPONENT_EXPORT __attribute__((visibility("default")))
+#define PERFETTO_EXPORT_COMPONENT __attribute__((visibility("default")))
#else
-#define PERFETTO_COMPONENT_EXPORT
+#define PERFETTO_EXPORT_COMPONENT
#endif
#endif // PERFETTO_BUILDFLAG(PERFETTO_OS_WIN)
#else // !PERFETTO_BUILDFLAG(PERFETTO_COMPONENT_BUILD)
-#define PERFETTO_COMPONENT_EXPORT
+#define PERFETTO_EXPORT_COMPONENT
#endif // PERFETTO_BUILDFLAG(PERFETTO_COMPONENT_BUILD)
diff --git a/include/perfetto/base/logging.h b/include/perfetto/base/logging.h
index 5ea2f1e..7730c32 100644
--- a/include/perfetto/base/logging.h
+++ b/include/perfetto/base/logging.h
@@ -114,10 +114,10 @@
// This is not thread safe and must be called before using tracing from other
// threads.
-PERFETTO_COMPONENT_EXPORT void SetLogMessageCallback(
+PERFETTO_EXPORT_COMPONENT void SetLogMessageCallback(
LogMessageCallback callback);
-PERFETTO_COMPONENT_EXPORT void LogMessage(LogLev,
+PERFETTO_EXPORT_COMPONENT void LogMessage(LogLev,
const char* fname,
int line,
const char* fmt,
@@ -126,7 +126,7 @@
// This is defined in debug_crash_stack_trace.cc, but that is only linked in
// standalone && debug builds, see enable_perfetto_stderr_crash_dump in
// perfetto.gni.
-PERFETTO_COMPONENT_EXPORT void EnableStacktraceOnCrashForDebug();
+PERFETTO_EXPORT_COMPONENT void EnableStacktraceOnCrashForDebug();
#if PERFETTO_ENABLE_LOG_RING_BUFFER()
// Gets a snapshot of the logs from the internal log ring buffer and:
@@ -135,7 +135,7 @@
// - On standalone builds (all otther OSes) prints that on stderr.
// This function must called only once, right before inducing a crash (This is
// because android_set_abort_message() can only be called once).
-PERFETTO_COMPONENT_EXPORT void MaybeSerializeLastLogsForCrashReporting();
+PERFETTO_EXPORT_COMPONENT void MaybeSerializeLastLogsForCrashReporting();
#else
inline void MaybeSerializeLastLogsForCrashReporting() {}
#endif
diff --git a/include/perfetto/base/status.h b/include/perfetto/base/status.h
index a52c908..2939357 100644
--- a/include/perfetto/base/status.h
+++ b/include/perfetto/base/status.h
@@ -30,7 +30,7 @@
// This can used as the return type of functions which would usually return an
// bool for success or int for errno but also wants to add some string context
// (ususally for logging).
-class PERFETTO_COMPONENT_EXPORT Status {
+class PERFETTO_EXPORT_COMPONENT Status {
public:
Status() : ok_(true) {}
explicit Status(std::string msg) : ok_(false), message_(std::move(msg)) {
diff --git a/include/perfetto/base/task_runner.h b/include/perfetto/base/task_runner.h
index ea573dc..653b0e6 100644
--- a/include/perfetto/base/task_runner.h
+++ b/include/perfetto/base/task_runner.h
@@ -37,7 +37,7 @@
// memory barrier between tasks.
//
// All methods of this interface can be called from any thread.
-class PERFETTO_COMPONENT_EXPORT TaskRunner {
+class PERFETTO_EXPORT_COMPONENT TaskRunner {
public:
virtual ~TaskRunner();
diff --git a/include/perfetto/ext/base/file_utils.h b/include/perfetto/ext/base/file_utils.h
index 2c1b205..64e4126 100644
--- a/include/perfetto/ext/base/file_utils.h
+++ b/include/perfetto/ext/base/file_utils.h
@@ -68,7 +68,7 @@
// This is an alias for close(). It's to avoid leaking Windows.h in headers.
// Exported because ScopedFile is used in the /include/ext API by Chromium
// component builds.
-int PERFETTO_COMPONENT_EXPORT CloseFile(int fd);
+int PERFETTO_EXPORT_COMPONENT CloseFile(int fd);
bool FlushFile(int fd);
diff --git a/include/perfetto/ext/base/scoped_file.h b/include/perfetto/ext/base/scoped_file.h
index e6a6166..f5133a7 100644
--- a/include/perfetto/ext/base/scoped_file.h
+++ b/include/perfetto/ext/base/scoped_file.h
@@ -91,7 +91,7 @@
};
// Declared in file_utils.h. Forward declared to avoid #include cycles.
-int PERFETTO_COMPONENT_EXPORT CloseFile(int fd);
+int PERFETTO_EXPORT_COMPONENT CloseFile(int fd);
// Use this for file resources obtained via open() and similar APIs.
using ScopedFile = ScopedResource<int, CloseFile, -1>;
diff --git a/include/perfetto/ext/base/thread_checker.h b/include/perfetto/ext/base/thread_checker.h
index aa6fb33..5a283ac 100644
--- a/include/perfetto/ext/base/thread_checker.h
+++ b/include/perfetto/ext/base/thread_checker.h
@@ -37,7 +37,7 @@
using ThreadID = pthread_t;
#endif
-class PERFETTO_COMPONENT_EXPORT ThreadChecker {
+class PERFETTO_EXPORT_COMPONENT ThreadChecker {
public:
ThreadChecker();
~ThreadChecker();
diff --git a/include/perfetto/ext/base/thread_task_runner.h b/include/perfetto/ext/base/thread_task_runner.h
index 1d8cdf9..aebde7b 100644
--- a/include/perfetto/ext/base/thread_task_runner.h
+++ b/include/perfetto/ext/base/thread_task_runner.h
@@ -32,7 +32,7 @@
// * the UnixTaskRunner will be constructed and destructed on the task thread.
// * the task thread will live for the lifetime of the UnixTaskRunner.
//
-class PERFETTO_COMPONENT_EXPORT ThreadTaskRunner : public TaskRunner {
+class PERFETTO_EXPORT_COMPONENT ThreadTaskRunner : public TaskRunner {
public:
static ThreadTaskRunner CreateAndStart(const std::string& name = "") {
return ThreadTaskRunner(name);
diff --git a/include/perfetto/ext/base/unix_socket.h b/include/perfetto/ext/base/unix_socket.h
index 2415cec..cfb8872 100644
--- a/include/perfetto/ext/base/unix_socket.h
+++ b/include/perfetto/ext/base/unix_socket.h
@@ -217,7 +217,7 @@
// | (failure or Shutdown())
// V
// OnDisconnect()
-class PERFETTO_COMPONENT_EXPORT UnixSocket {
+class PERFETTO_EXPORT_COMPONENT UnixSocket {
public:
class EventListener {
public:
diff --git a/include/perfetto/ext/ipc/service_proxy.h b/include/perfetto/ext/ipc/service_proxy.h
index 8e53121..aa9309d 100644
--- a/include/perfetto/ext/ipc/service_proxy.h
+++ b/include/perfetto/ext/ipc/service_proxy.h
@@ -39,7 +39,7 @@
// The base class for the client-side autogenerated stubs that forward method
// invocations to the host. All the methods of this class are meant to be called
// only by the autogenerated code.
-class PERFETTO_COMPONENT_EXPORT ServiceProxy {
+class PERFETTO_EXPORT_COMPONENT ServiceProxy {
public:
class EventListener {
public:
diff --git a/include/perfetto/ext/trace_processor/export_json.h b/include/perfetto/ext/trace_processor/export_json.h
index 3850e62..23119bf 100644
--- a/include/perfetto/ext/trace_processor/export_json.h
+++ b/include/perfetto/ext/trace_processor/export_json.h
@@ -39,7 +39,7 @@
using MetadataFilterPredicate = std::function<bool(const char* metadata_name)>;
using LabelFilterPredicate = std::function<bool(const char* label_name)>;
-class PERFETTO_COMPONENT_EXPORT OutputWriter {
+class PERFETTO_EXPORT_COMPONENT OutputWriter {
public:
OutputWriter();
virtual ~OutputWriter();
@@ -49,7 +49,7 @@
// Public for Chrome. Exports the trace loaded in TraceProcessorStorage to json,
// applying argument, metadata and label filtering using the callbacks.
-util::Status PERFETTO_COMPONENT_EXPORT
+util::Status PERFETTO_EXPORT_COMPONENT
ExportJson(TraceProcessorStorage*,
OutputWriter*,
ArgumentFilterPredicate = nullptr,
diff --git a/include/perfetto/ext/trace_processor/importers/memory_tracker/graph.h b/include/perfetto/ext/trace_processor/importers/memory_tracker/graph.h
index ac1c436..8ee5c74 100644
--- a/include/perfetto/ext/trace_processor/importers/memory_tracker/graph.h
+++ b/include/perfetto/ext/trace_processor/importers/memory_tracker/graph.h
@@ -38,7 +38,7 @@
// Contains processed node graphs for each process and in the global space.
// This class is also the arena which owns the nodes of the graph.
-class PERFETTO_COMPONENT_EXPORT GlobalNodeGraph {
+class PERFETTO_EXPORT_COMPONENT GlobalNodeGraph {
public:
class Node;
class Edge;
@@ -47,7 +47,7 @@
// Graph of nodes either associated with a process or with
// the shared space.
- class PERFETTO_COMPONENT_EXPORT Process {
+ class PERFETTO_EXPORT_COMPONENT Process {
public:
Process(base::PlatformProcessId pid, GlobalNodeGraph* global_graph);
~Process();
@@ -76,11 +76,11 @@
// A single node in the graph of allocator nodes associated with a
// certain path and containing the entries for this path.
- class PERFETTO_COMPONENT_EXPORT Node {
+ class PERFETTO_EXPORT_COMPONENT Node {
public:
// Auxilary data (a scalar number or a string) about this node each
// associated with a key.
- struct PERFETTO_COMPONENT_EXPORT Entry {
+ struct PERFETTO_EXPORT_COMPONENT Entry {
enum Type {
kUInt64,
kString,
@@ -212,7 +212,7 @@
// An edge in the node graph which indicates ownership between the
// source and target nodes.
- class PERFETTO_COMPONENT_EXPORT Edge {
+ class PERFETTO_EXPORT_COMPONENT Edge {
public:
Edge(GlobalNodeGraph::Node* source,
GlobalNodeGraph::Node* target,
@@ -229,7 +229,7 @@
};
// An iterator-esque class which yields nodes in a depth-first pre order.
- class PERFETTO_COMPONENT_EXPORT PreOrderIterator {
+ class PERFETTO_EXPORT_COMPONENT PreOrderIterator {
public:
explicit PreOrderIterator(std::vector<Node*>&& root_nodes);
PreOrderIterator(PreOrderIterator&& other);
@@ -244,7 +244,7 @@
};
// An iterator-esque class which yields nodes in a depth-first post order.
- class PERFETTO_COMPONENT_EXPORT PostOrderIterator {
+ class PERFETTO_EXPORT_COMPONENT PostOrderIterator {
public:
explicit PostOrderIterator(std::vector<Node*>&& root_nodes);
PostOrderIterator(PostOrderIterator&& other);
diff --git a/include/perfetto/ext/trace_processor/importers/memory_tracker/graph_processor.h b/include/perfetto/ext/trace_processor/importers/memory_tracker/graph_processor.h
index 6d0d790..f7b02e7 100644
--- a/include/perfetto/ext/trace_processor/importers/memory_tracker/graph_processor.h
+++ b/include/perfetto/ext/trace_processor/importers/memory_tracker/graph_processor.h
@@ -31,7 +31,7 @@
namespace perfetto {
namespace trace_processor {
-class PERFETTO_COMPONENT_EXPORT GraphProcessor {
+class PERFETTO_EXPORT_COMPONENT GraphProcessor {
public:
// This map does not own the pointers inside.
using RawMemoryNodeMap =
diff --git a/include/perfetto/ext/trace_processor/importers/memory_tracker/memory_allocator_node_id.h b/include/perfetto/ext/trace_processor/importers/memory_tracker/memory_allocator_node_id.h
index d16a1d4..96319a5 100644
--- a/include/perfetto/ext/trace_processor/importers/memory_tracker/memory_allocator_node_id.h
+++ b/include/perfetto/ext/trace_processor/importers/memory_tracker/memory_allocator_node_id.h
@@ -26,7 +26,7 @@
namespace perfetto {
namespace trace_processor {
-class PERFETTO_COMPONENT_EXPORT MemoryAllocatorNodeId {
+class PERFETTO_EXPORT_COMPONENT MemoryAllocatorNodeId {
public:
MemoryAllocatorNodeId();
explicit MemoryAllocatorNodeId(uint64_t id);
diff --git a/include/perfetto/ext/trace_processor/importers/memory_tracker/memory_graph_edge.h b/include/perfetto/ext/trace_processor/importers/memory_tracker/memory_graph_edge.h
index b6d2c02..b848945 100644
--- a/include/perfetto/ext/trace_processor/importers/memory_tracker/memory_graph_edge.h
+++ b/include/perfetto/ext/trace_processor/importers/memory_tracker/memory_graph_edge.h
@@ -25,7 +25,7 @@
namespace perfetto {
namespace trace_processor {
-class PERFETTO_COMPONENT_EXPORT MemoryGraphEdge {
+class PERFETTO_EXPORT_COMPONENT MemoryGraphEdge {
public:
MemoryGraphEdge(MemoryAllocatorNodeId s,
MemoryAllocatorNodeId t,
diff --git a/include/perfetto/ext/trace_processor/importers/memory_tracker/raw_memory_graph_node.h b/include/perfetto/ext/trace_processor/importers/memory_tracker/raw_memory_graph_node.h
index e7c6f0c..053a82b 100644
--- a/include/perfetto/ext/trace_processor/importers/memory_tracker/raw_memory_graph_node.h
+++ b/include/perfetto/ext/trace_processor/importers/memory_tracker/raw_memory_graph_node.h
@@ -54,7 +54,7 @@
};
// Data model for user-land memory nodes.
-class PERFETTO_COMPONENT_EXPORT RawMemoryGraphNode {
+class PERFETTO_EXPORT_COMPONENT RawMemoryGraphNode {
public:
enum Flags {
kDefault = 0,
@@ -67,7 +67,7 @@
// In the UI table each MemoryAllocatorNode becomes
// a row and each Entry generates a column (if it doesn't already
// exist).
- struct PERFETTO_COMPONENT_EXPORT MemoryNodeEntry {
+ struct PERFETTO_EXPORT_COMPONENT MemoryNodeEntry {
enum EntryType {
kUint64,
kString,
diff --git a/include/perfetto/ext/trace_processor/importers/memory_tracker/raw_process_memory_node.h b/include/perfetto/ext/trace_processor/importers/memory_tracker/raw_process_memory_node.h
index 93f8b36..b8d294d 100644
--- a/include/perfetto/ext/trace_processor/importers/memory_tracker/raw_process_memory_node.h
+++ b/include/perfetto/ext/trace_processor/importers/memory_tracker/raw_process_memory_node.h
@@ -34,7 +34,7 @@
// ProcessMemoryNode is as a strongly typed container which holds the nodes
// produced by the MemoryNodeProvider(s) for a specific process.
-class PERFETTO_COMPONENT_EXPORT RawProcessMemoryNode {
+class PERFETTO_EXPORT_COMPONENT RawProcessMemoryNode {
public:
// Maps allocator nodes absolute names (allocator_name/heap/subheap) to
// MemoryAllocatorNode instances.
diff --git a/include/perfetto/ext/tracing/core/consumer.h b/include/perfetto/ext/tracing/core/consumer.h
index cca1b86..949b727 100644
--- a/include/perfetto/ext/tracing/core/consumer.h
+++ b/include/perfetto/ext/tracing/core/consumer.h
@@ -27,7 +27,7 @@
class TracePacket;
-class PERFETTO_COMPONENT_EXPORT Consumer {
+class PERFETTO_EXPORT_COMPONENT Consumer {
public:
virtual ~Consumer();
diff --git a/include/perfetto/ext/tracing/core/producer.h b/include/perfetto/ext/tracing/core/producer.h
index ae95d7a..d4e8850 100644
--- a/include/perfetto/ext/tracing/core/producer.h
+++ b/include/perfetto/ext/tracing/core/producer.h
@@ -41,7 +41,7 @@
// This interface is subclassed by:
// 1. The actual producer code in the clients e.g., the ftrace reader process.
// 2. The transport layer when interposing RPC between service and producers.
-class PERFETTO_COMPONENT_EXPORT Producer {
+class PERFETTO_EXPORT_COMPONENT Producer {
public:
virtual ~Producer();
diff --git a/include/perfetto/ext/tracing/core/shared_memory.h b/include/perfetto/ext/tracing/core/shared_memory.h
index c973d93..f2e5274 100644
--- a/include/perfetto/ext/tracing/core/shared_memory.h
+++ b/include/perfetto/ext/tracing/core/shared_memory.h
@@ -33,9 +33,9 @@
// memory for the out-of-process case (see src/unix_rpc).
// Both this class and the Factory are subclassed by the transport layer, which
// will attach platform specific fields to it (e.g., a unix file descriptor).
-class PERFETTO_COMPONENT_EXPORT SharedMemory {
+class PERFETTO_EXPORT_COMPONENT SharedMemory {
public:
- class PERFETTO_COMPONENT_EXPORT Factory {
+ class PERFETTO_EXPORT_COMPONENT Factory {
public:
virtual ~Factory();
virtual std::unique_ptr<SharedMemory> CreateSharedMemory(size_t) = 0;
diff --git a/include/perfetto/ext/tracing/core/shared_memory_arbiter.h b/include/perfetto/ext/tracing/core/shared_memory_arbiter.h
index 17f8d3d..5fd225a 100644
--- a/include/perfetto/ext/tracing/core/shared_memory_arbiter.h
+++ b/include/perfetto/ext/tracing/core/shared_memory_arbiter.h
@@ -39,7 +39,7 @@
// Used by the Producer-side of the transport layer to vend TraceWriters
// from the SharedMemory it receives from the Service-side.
-class PERFETTO_COMPONENT_EXPORT SharedMemoryArbiter {
+class PERFETTO_EXPORT_COMPONENT SharedMemoryArbiter {
public:
virtual ~SharedMemoryArbiter();
diff --git a/include/perfetto/ext/tracing/core/trace_packet.h b/include/perfetto/ext/tracing/core/trace_packet.h
index 5fa96e1..353b1be 100644
--- a/include/perfetto/ext/tracing/core/trace_packet.h
+++ b/include/perfetto/ext/tracing/core/trace_packet.h
@@ -35,7 +35,7 @@
// If the packets are saved / streamed and not just consumed locally, consumers
// should ensure to preserve the unknown fields in the proto. A consumer, in
// fact, might have an older version .proto which is newer on the producer.
-class PERFETTO_COMPONENT_EXPORT TracePacket {
+class PERFETTO_EXPORT_COMPONENT TracePacket {
public:
using const_iterator = Slices::const_iterator;
diff --git a/include/perfetto/ext/tracing/core/trace_writer.h b/include/perfetto/ext/tracing/core/trace_writer.h
index 4512380..76b4fa6 100644
--- a/include/perfetto/ext/tracing/core/trace_writer.h
+++ b/include/perfetto/ext/tracing/core/trace_writer.h
@@ -33,7 +33,7 @@
} // namespace protos
// See comments in include/perfetto/tracing/trace_writer_base.h
-class PERFETTO_COMPONENT_EXPORT TraceWriter : public TraceWriterBase {
+class PERFETTO_EXPORT_COMPONENT TraceWriter : public TraceWriterBase {
public:
using TracePacketHandle =
protozero::MessageHandle<protos::pbzero::TracePacket>;
diff --git a/include/perfetto/ext/tracing/core/tracing_service.h b/include/perfetto/ext/tracing/core/tracing_service.h
index c28e97c..edaa82c 100644
--- a/include/perfetto/ext/tracing/core/tracing_service.h
+++ b/include/perfetto/ext/tracing/core/tracing_service.h
@@ -54,7 +54,7 @@
// to the ConnectProducer() method.
// 2. The transport layer (e.g., src/ipc) when the producer and
// the service don't talk locally but via some IPC mechanism.
-class PERFETTO_COMPONENT_EXPORT ProducerEndpoint {
+class PERFETTO_EXPORT_COMPONENT ProducerEndpoint {
public:
virtual ~ProducerEndpoint();
@@ -156,7 +156,7 @@
// the ConnectConsumer() method.
// 2. The transport layer (e.g., src/ipc) when the consumer and
// the service don't talk locally but via some IPC mechanism.
-class PERFETTO_COMPONENT_EXPORT ConsumerEndpoint {
+class PERFETTO_EXPORT_COMPONENT ConsumerEndpoint {
public:
virtual ~ConsumerEndpoint();
@@ -253,7 +253,7 @@
//
// Subclassed by:
// The service business logic in src/core/tracing_service_impl.cc.
-class PERFETTO_COMPONENT_EXPORT TracingService {
+class PERFETTO_EXPORT_COMPONENT TracingService {
public:
using ProducerEndpoint = perfetto::ProducerEndpoint;
using ConsumerEndpoint = perfetto::ConsumerEndpoint;
diff --git a/include/perfetto/ext/tracing/ipc/consumer_ipc_client.h b/include/perfetto/ext/tracing/ipc/consumer_ipc_client.h
index 3516737..961c2bc 100644
--- a/include/perfetto/ext/tracing/ipc/consumer_ipc_client.h
+++ b/include/perfetto/ext/tracing/ipc/consumer_ipc_client.h
@@ -32,7 +32,7 @@
// Consumer(s) of the tracing library.
// Implemented in:
// src/tracing/ipc/consumer/consumer_ipc_client_impl.cc
-class PERFETTO_COMPONENT_EXPORT ConsumerIPCClient {
+class PERFETTO_EXPORT_COMPONENT ConsumerIPCClient {
public:
// Connects to the producer port of the Service listening on the given
// |service_sock_name|. If the connection is successful, the OnConnect()
diff --git a/include/perfetto/ext/tracing/ipc/default_socket.h b/include/perfetto/ext/tracing/ipc/default_socket.h
index 6af12e0..015216d 100644
--- a/include/perfetto/ext/tracing/ipc/default_socket.h
+++ b/include/perfetto/ext/tracing/ipc/default_socket.h
@@ -21,8 +21,8 @@
namespace perfetto {
-PERFETTO_COMPONENT_EXPORT const char* GetConsumerSocket();
-PERFETTO_COMPONENT_EXPORT const char* GetProducerSocket();
+PERFETTO_EXPORT_COMPONENT const char* GetConsumerSocket();
+PERFETTO_EXPORT_COMPONENT const char* GetProducerSocket();
} // namespace perfetto
diff --git a/include/perfetto/ext/tracing/ipc/producer_ipc_client.h b/include/perfetto/ext/tracing/ipc/producer_ipc_client.h
index 2dfa3e1..1af399b 100644
--- a/include/perfetto/ext/tracing/ipc/producer_ipc_client.h
+++ b/include/perfetto/ext/tracing/ipc/producer_ipc_client.h
@@ -35,7 +35,7 @@
// Producer(s) of the tracing library.
// Implemented in:
// src/tracing/ipc/producer/producer_ipc_client_impl.cc
-class PERFETTO_COMPONENT_EXPORT ProducerIPCClient {
+class PERFETTO_EXPORT_COMPONENT ProducerIPCClient {
public:
enum class ConnectionFlags {
// Fails immediately with OnConnect(false) if the service connection cannot
diff --git a/include/perfetto/ext/tracing/ipc/service_ipc_host.h b/include/perfetto/ext/tracing/ipc/service_ipc_host.h
index 3815dad..8773f3e 100644
--- a/include/perfetto/ext/tracing/ipc/service_ipc_host.h
+++ b/include/perfetto/ext/tracing/ipc/service_ipc_host.h
@@ -36,7 +36,7 @@
// The code in the tracing client that will host the service e.g., traced.
// Implemented in:
// src/tracing/ipc/service/service_ipc_host_impl.cc
-class PERFETTO_COMPONENT_EXPORT ServiceIPCHost {
+class PERFETTO_EXPORT_COMPONENT ServiceIPCHost {
public:
static std::unique_ptr<ServiceIPCHost> CreateInstance(base::TaskRunner*);
virtual ~ServiceIPCHost();
diff --git a/include/perfetto/protozero/cpp_message_obj.h b/include/perfetto/protozero/cpp_message_obj.h
index 84a32ce..997a125 100644
--- a/include/perfetto/protozero/cpp_message_obj.h
+++ b/include/perfetto/protozero/cpp_message_obj.h
@@ -29,7 +29,7 @@
// Base class for generated .gen.h classes, which are full C++ objects that
// support both ser and deserialization (but are not zero-copy).
// This is only used by the "cpp" targets not the "pbzero" ones.
-class PERFETTO_COMPONENT_EXPORT CppMessageObj {
+class PERFETTO_EXPORT_COMPONENT CppMessageObj {
public:
virtual ~CppMessageObj();
virtual std::string SerializeAsString() const = 0;
diff --git a/include/perfetto/protozero/message.h b/include/perfetto/protozero/message.h
index e34b93b..069bc34 100644
--- a/include/perfetto/protozero/message.h
+++ b/include/perfetto/protozero/message.h
@@ -46,7 +46,7 @@
// append-only operations and is designed for performance. None of the methods
// require any dynamic memory allocation, unless more than 16 nested messages
// are created via BeginNestedMessage() calls.
-class PERFETTO_COMPONENT_EXPORT Message {
+class PERFETTO_EXPORT_COMPONENT Message {
public:
friend class MessageHandleBase;
diff --git a/include/perfetto/protozero/message_arena.h b/include/perfetto/protozero/message_arena.h
index 18dce54..828d07a 100644
--- a/include/perfetto/protozero/message_arena.h
+++ b/include/perfetto/protozero/message_arena.h
@@ -37,7 +37,7 @@
// allocating new blocks only when using deeply nested messages (which are
// extremely rare).
// This is used by RootMessage<T> to handle the storage for root-level messages.
-class PERFETTO_COMPONENT_EXPORT MessageArena {
+class PERFETTO_EXPORT_COMPONENT MessageArena {
public:
MessageArena();
~MessageArena();
diff --git a/include/perfetto/protozero/message_handle.h b/include/perfetto/protozero/message_handle.h
index 6198d4a..dfc2cdc 100644
--- a/include/perfetto/protozero/message_handle.h
+++ b/include/perfetto/protozero/message_handle.h
@@ -37,7 +37,7 @@
// Think about this as a WeakPtr<Message> which calls
// Message::Finalize() when going out of scope.
-class PERFETTO_COMPONENT_EXPORT MessageHandleBase {
+class PERFETTO_EXPORT_COMPONENT MessageHandleBase {
public:
~MessageHandleBase();
diff --git a/include/perfetto/protozero/proto_decoder.h b/include/perfetto/protozero/proto_decoder.h
index a6da6d4..accacb9 100644
--- a/include/perfetto/protozero/proto_decoder.h
+++ b/include/perfetto/protozero/proto_decoder.h
@@ -40,7 +40,7 @@
// (see proto_decoder_fuzzer.cc).
// This class serves also as a building block for TypedProtoDecoder, used when
// the schema is known at compile time.
-class PERFETTO_COMPONENT_EXPORT ProtoDecoder {
+class PERFETTO_EXPORT_COMPONENT ProtoDecoder {
public:
// Creates a ProtoDecoder using the given |buffer| with size |length| bytes.
ProtoDecoder(const void* buffer, size_t length)
@@ -279,7 +279,7 @@
// num_fields_ size_
// Note that if a message has high field numbers, upon creation |size_| can be
// < |num_fields_| (until a heap expansion is hit while inserting).
-class PERFETTO_COMPONENT_EXPORT TypedProtoDecoderBase : public ProtoDecoder {
+class PERFETTO_EXPORT_COMPONENT TypedProtoDecoderBase : public ProtoDecoder {
public:
// If the field |id| is known at compile time, prefer the templated
// specialization at<kFieldNumber>().
diff --git a/include/perfetto/protozero/scattered_heap_buffer.h b/include/perfetto/protozero/scattered_heap_buffer.h
index 138abda..55d5875 100644
--- a/include/perfetto/protozero/scattered_heap_buffer.h
+++ b/include/perfetto/protozero/scattered_heap_buffer.h
@@ -30,10 +30,10 @@
class Message;
-class PERFETTO_COMPONENT_EXPORT ScatteredHeapBuffer
+class PERFETTO_EXPORT_COMPONENT ScatteredHeapBuffer
: public protozero::ScatteredStreamWriter::Delegate {
public:
- class PERFETTO_COMPONENT_EXPORT Slice {
+ class PERFETTO_EXPORT_COMPONENT Slice {
public:
Slice();
explicit Slice(size_t size);
diff --git a/include/perfetto/protozero/scattered_stream_null_delegate.h b/include/perfetto/protozero/scattered_stream_null_delegate.h
index af116a3..b06b91d 100644
--- a/include/perfetto/protozero/scattered_stream_null_delegate.h
+++ b/include/perfetto/protozero/scattered_stream_null_delegate.h
@@ -27,7 +27,7 @@
namespace protozero {
-class PERFETTO_COMPONENT_EXPORT ScatteredStreamWriterNullDelegate
+class PERFETTO_EXPORT_COMPONENT ScatteredStreamWriterNullDelegate
: public ScatteredStreamWriter::Delegate {
public:
explicit ScatteredStreamWriterNullDelegate(size_t chunk_size);
diff --git a/include/perfetto/protozero/scattered_stream_writer.h b/include/perfetto/protozero/scattered_stream_writer.h
index 0781b50..51da604 100644
--- a/include/perfetto/protozero/scattered_stream_writer.h
+++ b/include/perfetto/protozero/scattered_stream_writer.h
@@ -41,9 +41,9 @@
// The purpose of this class is to abstract away the non-contiguous write logic.
// This class knows how to deal with writes as long as they fall in the same
// ContiguousMemoryRange and defers the chunk-chaining logic to the Delegate.
-class PERFETTO_COMPONENT_EXPORT ScatteredStreamWriter {
+class PERFETTO_EXPORT_COMPONENT ScatteredStreamWriter {
public:
- class PERFETTO_COMPONENT_EXPORT Delegate {
+ class PERFETTO_EXPORT_COMPONENT Delegate {
public:
virtual ~Delegate();
virtual ContiguousMemoryRange GetNewBuffer() = 0;
diff --git a/include/perfetto/protozero/static_buffer.h b/include/perfetto/protozero/static_buffer.h
index b32be9c..cbc91e2 100644
--- a/include/perfetto/protozero/static_buffer.h
+++ b/include/perfetto/protozero/static_buffer.h
@@ -32,7 +32,7 @@
// A simple implementation of ScatteredStreamWriter::Delegate backed by a
// fixed-size buffer. It doesn't support expansion. The caller needs to ensure
// to never write more than the size of the buffer. Will CHECK() otherwise.
-class PERFETTO_COMPONENT_EXPORT StaticBufferDelegate
+class PERFETTO_EXPORT_COMPONENT StaticBufferDelegate
: public ScatteredStreamWriter::Delegate {
public:
StaticBufferDelegate(uint8_t* buf, size_t len) : range_{buf, buf + len} {}
diff --git a/include/perfetto/test/traced_value_test_support.h b/include/perfetto/test/traced_value_test_support.h
index b5b7a0d..546d447 100644
--- a/include/perfetto/test/traced_value_test_support.h
+++ b/include/perfetto/test/traced_value_test_support.h
@@ -25,7 +25,7 @@
namespace perfetto {
namespace internal {
-PERFETTO_COMPONENT_EXPORT std::string DebugAnnotationToString(
+PERFETTO_EXPORT_COMPONENT std::string DebugAnnotationToString(
const std::string& proto_message);
} // namespace internal
diff --git a/include/perfetto/trace_processor/basic_types.h b/include/perfetto/trace_processor/basic_types.h
index e50d82f..58c261f 100644
--- a/include/perfetto/trace_processor/basic_types.h
+++ b/include/perfetto/trace_processor/basic_types.h
@@ -95,7 +95,7 @@
};
// Struct for configuring a TraceProcessor instance (see trace_processor.h).
-struct PERFETTO_COMPONENT_EXPORT Config {
+struct PERFETTO_EXPORT_COMPONENT Config {
// Indicates the sortinng mode that trace processor should use on the passed
// trace packets. See the enum documentation for more details.
SortingMode sorting_mode = SortingMode::kDefaultHeuristics;
@@ -121,7 +121,7 @@
};
// Represents a dynamically typed value returned by SQL.
-struct PERFETTO_COMPONENT_EXPORT SqlValue {
+struct PERFETTO_EXPORT_COMPONENT SqlValue {
// Represents the type of the value.
enum Type {
kNull = 0,
diff --git a/include/perfetto/trace_processor/iterator.h b/include/perfetto/trace_processor/iterator.h
index bb0eaef..45a3cde 100644
--- a/include/perfetto/trace_processor/iterator.h
+++ b/include/perfetto/trace_processor/iterator.h
@@ -40,7 +40,7 @@
// }
// printf("\n");
// }
-class PERFETTO_COMPONENT_EXPORT Iterator {
+class PERFETTO_EXPORT_COMPONENT Iterator {
public:
explicit Iterator(std::unique_ptr<IteratorImpl>);
~Iterator();
diff --git a/include/perfetto/trace_processor/read_trace.h b/include/perfetto/trace_processor/read_trace.h
index 8fa45c3..98b3ddd 100644
--- a/include/perfetto/trace_processor/read_trace.h
+++ b/include/perfetto/trace_processor/read_trace.h
@@ -28,12 +28,12 @@
class TraceProcessor;
-util::Status PERFETTO_COMPONENT_EXPORT ReadTrace(
+util::Status PERFETTO_EXPORT_COMPONENT ReadTrace(
TraceProcessor* tp,
const char* filename,
const std::function<void(uint64_t parsed_size)>& progress_callback = {});
-util::Status PERFETTO_COMPONENT_EXPORT
+util::Status PERFETTO_EXPORT_COMPONENT
DecompressTrace(const uint8_t* data, size_t size, std::vector<uint8_t>* output);
} // namespace trace_processor
diff --git a/include/perfetto/trace_processor/trace_blob.h b/include/perfetto/trace_processor/trace_blob.h
index 8985ff4..87f327f 100644
--- a/include/perfetto/trace_processor/trace_blob.h
+++ b/include/perfetto/trace_processor/trace_blob.h
@@ -53,7 +53,7 @@
// sub-offsets of) the same TraceBlob.
// The neat thing about TraceBlob is that it deals transparently with owned
// memory (in the case of Allocate and TakeOwnership) and memory-mapped memory.
-class PERFETTO_COMPONENT_EXPORT TraceBlob : public RefCounted {
+class PERFETTO_EXPORT_COMPONENT TraceBlob : public RefCounted {
public:
static TraceBlob Allocate(size_t size);
static TraceBlob CopyFrom(const void*, size_t size);
diff --git a/include/perfetto/trace_processor/trace_processor.h b/include/perfetto/trace_processor/trace_processor.h
index 3cc419a..028e504 100644
--- a/include/perfetto/trace_processor/trace_processor.h
+++ b/include/perfetto/trace_processor/trace_processor.h
@@ -32,7 +32,7 @@
// Extends TraceProcessorStorage to support execution of SQL queries on loaded
// traces. See TraceProcessorStorage for parsing of trace files.
-class PERFETTO_COMPONENT_EXPORT TraceProcessor : public TraceProcessorStorage {
+class PERFETTO_EXPORT_COMPONENT TraceProcessor : public TraceProcessorStorage {
public:
// For legacy API clients. Iterator used to be a nested class here. Many API
// clients depends on it at this point.
@@ -127,7 +127,7 @@
};
// When set, logs SQLite actions on the console.
-void PERFETTO_COMPONENT_EXPORT EnableSQLiteVtableDebugging();
+void PERFETTO_EXPORT_COMPONENT EnableSQLiteVtableDebugging();
} // namespace trace_processor
} // namespace perfetto
diff --git a/include/perfetto/trace_processor/trace_processor_storage.h b/include/perfetto/trace_processor/trace_processor_storage.h
index fef7a81..d166b68 100644
--- a/include/perfetto/trace_processor/trace_processor_storage.h
+++ b/include/perfetto/trace_processor/trace_processor_storage.h
@@ -31,7 +31,7 @@
namespace trace_processor {
// Coordinates the loading of traces from an arbitrary source.
-class PERFETTO_COMPONENT_EXPORT TraceProcessorStorage {
+class PERFETTO_EXPORT_COMPONENT TraceProcessorStorage {
public:
// Creates a new instance of TraceProcessorStorage.
static std::unique_ptr<TraceProcessorStorage> CreateInstance(const Config&);
diff --git a/include/perfetto/tracing/console_interceptor.h b/include/perfetto/tracing/console_interceptor.h
index 53174c4..587a4af 100644
--- a/include/perfetto/tracing/console_interceptor.h
+++ b/include/perfetto/tracing/console_interceptor.h
@@ -57,7 +57,7 @@
struct ConsoleColor;
-class PERFETTO_COMPONENT_EXPORT ConsoleInterceptor
+class PERFETTO_EXPORT_COMPONENT ConsoleInterceptor
: public Interceptor<ConsoleInterceptor> {
public:
~ConsoleInterceptor() override;
diff --git a/include/perfetto/tracing/data_source.h b/include/perfetto/tracing/data_source.h
index d8776c7..a649e59 100644
--- a/include/perfetto/tracing/data_source.h
+++ b/include/perfetto/tracing/data_source.h
@@ -64,7 +64,7 @@
// Base class with the virtual methods to get start/stop notifications.
// Embedders are supposed to derive the templated version below, not this one.
-class PERFETTO_COMPONENT_EXPORT DataSourceBase {
+class PERFETTO_EXPORT_COMPONENT DataSourceBase {
public:
virtual ~DataSourceBase();
diff --git a/include/perfetto/tracing/debug_annotation.h b/include/perfetto/tracing/debug_annotation.h
index a5c370c..2c09221 100644
--- a/include/perfetto/tracing/debug_annotation.h
+++ b/include/perfetto/tracing/debug_annotation.h
@@ -48,7 +48,7 @@
} // namespace protos
// A base class for custom track event debug annotations.
-class PERFETTO_COMPONENT_EXPORT DebugAnnotation {
+class PERFETTO_EXPORT_COMPONENT DebugAnnotation {
public:
DebugAnnotation() = default;
virtual ~DebugAnnotation();
diff --git a/include/perfetto/tracing/event_context.h b/include/perfetto/tracing/event_context.h
index eac5aa4..616ac10 100644
--- a/include/perfetto/tracing/event_context.h
+++ b/include/perfetto/tracing/event_context.h
@@ -43,7 +43,7 @@
// ctx.AddDebugAnnotation("name", 1234);
// });
//
-class PERFETTO_COMPONENT_EXPORT EventContext {
+class PERFETTO_EXPORT_COMPONENT EventContext {
public:
EventContext(EventContext&&) = default;
diff --git a/include/perfetto/tracing/interceptor.h b/include/perfetto/tracing/interceptor.h
index 9cbc183..d666b11 100644
--- a/include/perfetto/tracing/interceptor.h
+++ b/include/perfetto/tracing/interceptor.h
@@ -179,7 +179,7 @@
// A virtual base class for interceptors. Users should derive from the templated
// subclass below instead of this one.
-class PERFETTO_COMPONENT_EXPORT InterceptorBase {
+class PERFETTO_EXPORT_COMPONENT InterceptorBase {
public:
virtual ~InterceptorBase();
@@ -246,7 +246,7 @@
// Templated interceptor instantiation. See above for usage.
template <class InterceptorType>
-class PERFETTO_COMPONENT_EXPORT Interceptor : public InterceptorBase {
+class PERFETTO_EXPORT_COMPONENT Interceptor : public InterceptorBase {
public:
// A context object provided to the ThreadLocalState constructor. Provides
// access to the per-instance interceptor object.
diff --git a/include/perfetto/tracing/internal/checked_scope.h b/include/perfetto/tracing/internal/checked_scope.h
index 21a779c..c03eab9 100644
--- a/include/perfetto/tracing/internal/checked_scope.h
+++ b/include/perfetto/tracing/internal/checked_scope.h
@@ -31,7 +31,7 @@
// being active and the inner scope becomes active instead.
// - Only an active scope can be destroyed. When this happens, its parent scope
// becomes active.
-class PERFETTO_COMPONENT_EXPORT CheckedScope {
+class PERFETTO_EXPORT_COMPONENT CheckedScope {
public:
explicit CheckedScope(CheckedScope* parent_scope);
~CheckedScope();
diff --git a/include/perfetto/tracing/internal/in_process_tracing_backend.h b/include/perfetto/tracing/internal/in_process_tracing_backend.h
index a3c23da..c793ae1 100644
--- a/include/perfetto/tracing/internal/in_process_tracing_backend.h
+++ b/include/perfetto/tracing/internal/in_process_tracing_backend.h
@@ -35,7 +35,7 @@
// instance in-process. Instantiated when the embedder calls
// Tracing::Initialize(kInProcessBackend). Solves most in-app-only tracing
// use-cases.
-class PERFETTO_COMPONENT_EXPORT InProcessTracingBackend
+class PERFETTO_EXPORT_COMPONENT InProcessTracingBackend
: public TracingBackend {
public:
static TracingBackend* GetInstance();
diff --git a/include/perfetto/tracing/internal/system_tracing_backend.h b/include/perfetto/tracing/internal/system_tracing_backend.h
index 08ea7bd..e1b0ff3 100644
--- a/include/perfetto/tracing/internal/system_tracing_backend.h
+++ b/include/perfetto/tracing/internal/system_tracing_backend.h
@@ -35,7 +35,7 @@
// together with system traces, useful to correlate on the timeline system
// events (e.g. scheduling slices from the kernel) with in-app events.
namespace internal {
-class PERFETTO_COMPONENT_EXPORT SystemTracingBackend : public TracingBackend {
+class PERFETTO_EXPORT_COMPONENT SystemTracingBackend : public TracingBackend {
public:
static TracingBackend* GetInstance();
diff --git a/include/perfetto/tracing/internal/tracing_backend_fake.h b/include/perfetto/tracing/internal/tracing_backend_fake.h
index c723a54..906ee2e 100644
--- a/include/perfetto/tracing/internal/tracing_backend_fake.h
+++ b/include/perfetto/tracing/internal/tracing_backend_fake.h
@@ -25,7 +25,7 @@
// A built-in implementation of TracingBackend that fails any attempt to create
// a tracing session.
-class PERFETTO_COMPONENT_EXPORT TracingBackendFake : public TracingBackend {
+class PERFETTO_EXPORT_COMPONENT TracingBackendFake : public TracingBackend {
public:
static TracingBackend* GetInstance();
diff --git a/include/perfetto/tracing/internal/tracing_muxer.h b/include/perfetto/tracing/internal/tracing_muxer.h
index 7d87771..e067652 100644
--- a/include/perfetto/tracing/internal/tracing_muxer.h
+++ b/include/perfetto/tracing/internal/tracing_muxer.h
@@ -47,7 +47,7 @@
// and methods that are required to implement them should go into
// src/tracing/internal/tracing_muxer_impl.h instead: that one can pull in
// perfetto headers outside of public, this one cannot.
-class PERFETTO_COMPONENT_EXPORT TracingMuxer {
+class PERFETTO_EXPORT_COMPONENT TracingMuxer {
public:
static TracingMuxer* Get() { return instance_; }
diff --git a/include/perfetto/tracing/internal/track_event_internal.h b/include/perfetto/tracing/internal/track_event_internal.h
index 806a730..95c0e2f 100644
--- a/include/perfetto/tracing/internal/track_event_internal.h
+++ b/include/perfetto/tracing/internal/track_event_internal.h
@@ -65,7 +65,7 @@
// A callback interface for observing track event tracing sessions starting and
// stopping. See TrackEvent::{Add,Remove}SessionObserver. Note that all methods
// will be called on an internal Perfetto thread.
-class PERFETTO_COMPONENT_EXPORT TrackEventSessionObserver {
+class PERFETTO_EXPORT_COMPONENT TrackEventSessionObserver {
public:
virtual ~TrackEventSessionObserver();
// Called when a track event tracing session is configured. Note tracing isn't
@@ -83,7 +83,7 @@
namespace internal {
class TrackEventCategoryRegistry;
-class PERFETTO_COMPONENT_EXPORT BaseTrackEventInternedDataIndex {
+class PERFETTO_EXPORT_COMPONENT BaseTrackEventInternedDataIndex {
public:
virtual ~BaseTrackEventInternedDataIndex();
@@ -165,7 +165,7 @@
// The backend portion of the track event trace point implemention. Outlined to
// a separate .cc file so it can be shared by different track event category
// namespaces.
-class PERFETTO_COMPONENT_EXPORT TrackEventInternal {
+class PERFETTO_EXPORT_COMPONENT TrackEventInternal {
public:
static bool Initialize(
const TrackEventCategoryRegistry&,
diff --git a/include/perfetto/tracing/internal/track_event_interned_fields.h b/include/perfetto/tracing/internal/track_event_interned_fields.h
index ec5449f..f83ac58 100644
--- a/include/perfetto/tracing/internal/track_event_interned_fields.h
+++ b/include/perfetto/tracing/internal/track_event_interned_fields.h
@@ -27,7 +27,7 @@
// to share the interning buffers with Perfetto internals (e.g.
// perfetto::TracedValue implementation).
-struct PERFETTO_COMPONENT_EXPORT InternedEventCategory
+struct PERFETTO_EXPORT_COMPONENT InternedEventCategory
: public TrackEventInternedDataIndex<
InternedEventCategory,
perfetto::protos::pbzero::InternedData::kEventCategoriesFieldNumber,
@@ -41,7 +41,7 @@
size_t length);
};
-struct PERFETTO_COMPONENT_EXPORT InternedEventName
+struct PERFETTO_EXPORT_COMPONENT InternedEventName
: public TrackEventInternedDataIndex<
InternedEventName,
perfetto::protos::pbzero::InternedData::kEventNamesFieldNumber,
@@ -54,7 +54,7 @@
const char* value);
};
-struct PERFETTO_COMPONENT_EXPORT InternedDebugAnnotationName
+struct PERFETTO_EXPORT_COMPONENT InternedDebugAnnotationName
: public TrackEventInternedDataIndex<
InternedDebugAnnotationName,
perfetto::protos::pbzero::InternedData::
@@ -68,7 +68,7 @@
const char* value);
};
-struct PERFETTO_COMPONENT_EXPORT InternedDebugAnnotationValueTypeName
+struct PERFETTO_EXPORT_COMPONENT InternedDebugAnnotationValueTypeName
: public TrackEventInternedDataIndex<
InternedDebugAnnotationValueTypeName,
perfetto::protos::pbzero::InternedData::
diff --git a/include/perfetto/tracing/internal/track_event_macros.h b/include/perfetto/tracing/internal/track_event_macros.h
index 05dd5af..d9ae969 100644
--- a/include/perfetto/tracing/internal/track_event_macros.h
+++ b/include/perfetto/tracing/internal/track_event_macros.h
@@ -79,7 +79,7 @@
namespace internal { \
PERFETTO_COMPONENT_EXPORT std::atomic<uint8_t> \
g_category_state_storage[kCategoryCount]; \
- PERFETTO_COMPONENT_EXPORT const ::perfetto::internal:: \
+ PERFETTO_EXPORT_COMPONENT const ::perfetto::internal:: \
TrackEventCategoryRegistry kCategoryRegistry( \
kCategoryCount, \
&kCategories[0], \
diff --git a/include/perfetto/tracing/platform.h b/include/perfetto/tracing/platform.h
index eb302dd..fde6b11 100644
--- a/include/perfetto/tracing/platform.h
+++ b/include/perfetto/tracing/platform.h
@@ -44,7 +44,7 @@
// Base class for thread-local objects. This is to get a basic object vtable and
// delegate destruction to the embedder. See Platform::CreateThreadLocalObject.
-class PERFETTO_COMPONENT_EXPORT PlatformThreadLocalObject {
+class PERFETTO_EXPORT_COMPONENT PlatformThreadLocalObject {
public:
// Implemented by perfetto internal code. The embedder must call this when
// implementing GetOrCreateThreadLocalObject() to create an instance for the
@@ -53,7 +53,7 @@
virtual ~PlatformThreadLocalObject();
};
-class PERFETTO_COMPONENT_EXPORT Platform {
+class PERFETTO_EXPORT_COMPONENT Platform {
public:
// Embedders can use this unless they have custom needs (e.g. Chrome wanting
// to use its own base class for TLS).
diff --git a/include/perfetto/tracing/string_helpers.h b/include/perfetto/tracing/string_helpers.h
index 1639879..c5d239f 100644
--- a/include/perfetto/tracing/string_helpers.h
+++ b/include/perfetto/tracing/string_helpers.h
@@ -26,7 +26,7 @@
// A wrapper for marking strings that can't be determined to be static at build
// time, but are in fact static.
-class PERFETTO_COMPONENT_EXPORT StaticString {
+class PERFETTO_EXPORT_COMPONENT StaticString {
public:
// Implicit constructor for string literals.
template <size_t N>
@@ -70,7 +70,7 @@
// A explicit wrapper for marking strings as dynamic to ensure that perfetto
// doesn't try to cache the pointer value.
-class PERFETTO_COMPONENT_EXPORT DynamicString {
+class PERFETTO_EXPORT_COMPONENT DynamicString {
public:
explicit DynamicString(const std::string& str)
: value(str.data()), length(str.length()) {}
diff --git a/include/perfetto/tracing/traced_value.h b/include/perfetto/tracing/traced_value.h
index 9a98ead..7594ab1 100644
--- a/include/perfetto/tracing/traced_value.h
+++ b/include/perfetto/tracing/traced_value.h
@@ -120,12 +120,12 @@
// TODO(altimin): Currently EventContext can be null due the need to support
// TracedValue-based serialisation with the Chrome's TraceLog. After this is
// gone, the second parameter should be changed to EventContext&.
-PERFETTO_COMPONENT_EXPORT TracedValue
+PERFETTO_EXPORT_COMPONENT TracedValue
CreateTracedValueFromProto(protos::pbzero::DebugAnnotation*,
EventContext* = nullptr);
}
-class PERFETTO_COMPONENT_EXPORT TracedValue {
+class PERFETTO_EXPORT_COMPONENT TracedValue {
public:
TracedValue(const TracedValue&) = delete;
TracedValue& operator=(const TracedValue&) = delete;
@@ -204,7 +204,7 @@
event_context_);
}
-class PERFETTO_COMPONENT_EXPORT TracedArray {
+class PERFETTO_EXPORT_COMPONENT TracedArray {
public:
// implicit
TracedArray(TracedValue);
@@ -241,7 +241,7 @@
internal::CheckedScope checked_scope_;
};
-class PERFETTO_COMPONENT_EXPORT TracedDictionary {
+class PERFETTO_EXPORT_COMPONENT TracedDictionary {
public:
// implicit
TracedDictionary(TracedValue);
diff --git a/include/perfetto/tracing/tracing.h b/include/perfetto/tracing/tracing.h
index b1b34a9..e0f95e1 100644
--- a/include/perfetto/tracing/tracing.h
+++ b/include/perfetto/tracing/tracing.h
@@ -138,7 +138,7 @@
};
// The entry-point for using perfetto.
-class PERFETTO_COMPONENT_EXPORT Tracing {
+class PERFETTO_EXPORT_COMPONENT Tracing {
public:
// Initializes Perfetto with the given backends in the calling process and/or
// with a user-provided backend. No-op if called more than once.
@@ -188,7 +188,7 @@
Tracing() = delete;
};
-class PERFETTO_COMPONENT_EXPORT TracingSession {
+class PERFETTO_EXPORT_COMPONENT TracingSession {
public:
virtual ~TracingSession();
diff --git a/include/perfetto/tracing/tracing_backend.h b/include/perfetto/tracing/tracing_backend.h
index d8efbe0..e0c15df 100644
--- a/include/perfetto/tracing/tracing_backend.h
+++ b/include/perfetto/tracing/tracing_backend.h
@@ -43,7 +43,7 @@
class Producer;
class ProducerEndpoint;
-class PERFETTO_COMPONENT_EXPORT TracingBackend {
+class PERFETTO_EXPORT_COMPONENT TracingBackend {
public:
virtual ~TracingBackend();
diff --git a/include/perfetto/tracing/tracing_policy.h b/include/perfetto/tracing/tracing_policy.h
index e5e4f66..f1c4c9a 100644
--- a/include/perfetto/tracing/tracing_policy.h
+++ b/include/perfetto/tracing/tracing_policy.h
@@ -27,7 +27,7 @@
// Applies policy decisions, such as allowing or denying connections, when
// certain tracing SDK events occur. All methods are called on an internal
// perfetto thread.
-class PERFETTO_COMPONENT_EXPORT TracingPolicy {
+class PERFETTO_EXPORT_COMPONENT TracingPolicy {
public:
virtual ~TracingPolicy();
diff --git a/include/perfetto/tracing/track.h b/include/perfetto/tracing/track.h
index adc8b50..612b7d9 100644
--- a/include/perfetto/tracing/track.h
+++ b/include/perfetto/tracing/track.h
@@ -79,7 +79,7 @@
//
// perfetto::TrackEvent::EraseTrackDescriptor(track);
//
-struct PERFETTO_COMPONENT_EXPORT Track {
+struct PERFETTO_EXPORT_COMPONENT Track {
const uint64_t uuid;
const uint64_t parent_uuid;
constexpr Track() : uuid(0), parent_uuid(0) {}
@@ -154,7 +154,7 @@
// A process track represents events that describe the state of the entire
// application (e.g., counter events). Currently a ProcessTrack can only
// represent the current process.
-struct PERFETTO_COMPONENT_EXPORT ProcessTrack : public Track {
+struct PERFETTO_EXPORT_COMPONENT ProcessTrack : public Track {
const base::PlatformProcessId pid;
static ProcessTrack Current() { return ProcessTrack(); }
@@ -169,7 +169,7 @@
// A thread track is associated with a specific thread of execution. Currently
// only threads in the current process can be referenced.
-struct PERFETTO_COMPONENT_EXPORT ThreadTrack : public Track {
+struct PERFETTO_EXPORT_COMPONENT ThreadTrack : public Track {
const base::PlatformProcessId pid;
const base::PlatformThreadId tid;
@@ -315,9 +315,9 @@
// descriptor for that track (see *Track::Serialize) or 2) a serialized
// descriptor stored in the registry which may have additional metadata (e.g.,
// track name).
-// TODO(eseckler): Remove PERFETTO_COMPONENT_EXPORT once Chromium no longer
+// TODO(eseckler): Remove PERFETTO_EXPORT_COMPONENT once Chromium no longer
// calls TrackRegistry::InitializeInstance() directly.
-class PERFETTO_COMPONENT_EXPORT TrackRegistry {
+class PERFETTO_EXPORT_COMPONENT TrackRegistry {
public:
using SerializedTrackDescriptor = std::string;
diff --git a/include/perfetto/tracing/track_event_category_registry.h b/include/perfetto/tracing/track_event_category_registry.h
index b3dcf93..5eff948 100644
--- a/include/perfetto/tracing/track_event_category_registry.h
+++ b/include/perfetto/tracing/track_event_category_registry.h
@@ -29,7 +29,7 @@
// A compile-time representation of a track event category. See
// PERFETTO_DEFINE_CATEGORIES for registering your own categories.
-struct PERFETTO_COMPONENT_EXPORT Category {
+struct PERFETTO_EXPORT_COMPONENT Category {
using Tags = std::array<const char*, 4>;
const char* const name = nullptr;
@@ -150,7 +150,7 @@
// container type to make it less likely for trace points to accidentally start
// using dynamic categories. Events with dynamic categories will always be
// slightly more expensive than regular events, so use them sparingly.
-class PERFETTO_COMPONENT_EXPORT DynamicCategory final {
+class PERFETTO_EXPORT_COMPONENT DynamicCategory final {
public:
explicit DynamicCategory(const std::string& name_) : name(name_) {}
explicit DynamicCategory(const char* name_) : name(name_) {}
@@ -190,7 +190,7 @@
// Holds all the registered categories for one category namespace. See
// PERFETTO_DEFINE_CATEGORIES for building the registry.
-class PERFETTO_COMPONENT_EXPORT TrackEventCategoryRegistry {
+class PERFETTO_EXPORT_COMPONENT TrackEventCategoryRegistry {
public:
constexpr TrackEventCategoryRegistry(size_t category_count,
const Category* categories,
diff --git a/include/perfetto/tracing/track_event_legacy.h b/include/perfetto/tracing/track_event_legacy.h
index 819352c..0ec0ddd 100644
--- a/include/perfetto/tracing/track_event_legacy.h
+++ b/include/perfetto/tracing/track_event_legacy.h
@@ -182,7 +182,7 @@
// Built-in implementation for events referring to the current thread.
template <>
-ThreadTrack PERFETTO_COMPONENT_EXPORT
+ThreadTrack PERFETTO_EXPORT_COMPONENT
ConvertThreadId(const PerfettoLegacyCurrentThreadId&);
} // namespace legacy
@@ -190,7 +190,7 @@
namespace internal {
// LegacyTraceId encapsulates an ID that can either be an integer or pointer.
-class PERFETTO_COMPONENT_EXPORT LegacyTraceId {
+class PERFETTO_EXPORT_COMPONENT LegacyTraceId {
public:
// Can be combined with WithScope.
class LocalId {
@@ -303,7 +303,7 @@
namespace perfetto {
namespace internal {
-class PERFETTO_COMPONENT_EXPORT TrackEventLegacy {
+class PERFETTO_EXPORT_COMPONENT TrackEventLegacy {
public:
static constexpr protos::pbzero::TrackEvent::Type PhaseToType(char phase) {
// clang-format off
diff --git a/include/perfetto/tracing/track_event_state_tracker.h b/include/perfetto/tracing/track_event_state_tracker.h
index 42be5f7..d298c24 100644
--- a/include/perfetto/tracing/track_event_state_tracker.h
+++ b/include/perfetto/tracing/track_event_state_tracker.h
@@ -36,7 +36,7 @@
// A helper for keeping track of incremental state when intercepting track
// events.
-class PERFETTO_COMPONENT_EXPORT TrackEventStateTracker {
+class PERFETTO_EXPORT_COMPONENT TrackEventStateTracker {
public:
~TrackEventStateTracker();
diff --git a/src/base/logging.cc b/src/base/logging.cc
index 8bd74fc..23edd80 100644
--- a/src/base/logging.cc
+++ b/src/base/logging.cc
@@ -53,7 +53,7 @@
#if PERFETTO_BUILDFLAG(PERFETTO_STDERR_CRASH_DUMP)
// __attribute__((constructor)) causes a static initializer that automagically
// early runs this function before the main().
-void PERFETTO_COMPONENT_EXPORT __attribute__((constructor))
+void PERFETTO_EXPORT_COMPONENT __attribute__((constructor))
InitDebugCrashReporter() {
// This function is defined in debug_crash_stack_trace.cc.
// The dynamic initializer is in logging.cc because logging.cc is included
diff --git a/src/base/utils.cc b/src/base/utils.cc
index a4c0f3f..0b08ece 100644
--- a/src/base/utils.cc
+++ b/src/base/utils.cc
@@ -82,7 +82,7 @@
// If we are building with -msse4 check that the CPU actually supports it.
// This file must be kept in sync with gn/standalone/BUILD.gn.
-void PERFETTO_COMPONENT_EXPORT __attribute__((constructor))
+void PERFETTO_EXPORT_COMPONENT __attribute__((constructor))
CheckCpuOptimizations() {
uint32_t eax = 0, ebx = 0, ecx = 0, edx = 0;
PERFETTO_GETCPUID(eax, ebx, ecx, edx, 1, 0);
diff --git a/src/protozero/protoc_plugin/cppgen_plugin.cc b/src/protozero/protoc_plugin/cppgen_plugin.cc
index fdc6821..3086ece 100644
--- a/src/protozero/protoc_plugin/cppgen_plugin.cc
+++ b/src/protozero/protoc_plugin/cppgen_plugin.cc
@@ -532,7 +532,7 @@
void CppObjGenerator::GenClassDecl(const Descriptor* msg, Printer* p) const {
std::string full_name = GetFullName(msg);
p->Print(
- "\nclass PERFETTO_COMPONENT_EXPORT $n$ : public "
+ "\nclass PERFETTO_EXPORT_COMPONENT $n$ : public "
"::protozero::CppMessageObj {\n",
"n", full_name);
p->Print(" public:\n");