0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-25 15:04:10 +01:00

ircd::db: Elide unnecessary exported symbols.

This commit is contained in:
Jason Volk 2020-09-21 19:14:17 -07:00
parent 7201a11c7a
commit 3c0c0283df
3 changed files with 61 additions and 35 deletions

View file

@ -55,6 +55,12 @@
#include <rocksdb/wal_filter.h>
#include <rocksdb/rate_limiter.h>
#include "db_has.h"
#include "db_port.h"
#include "db_env.h"
#include "db_env_state.h"
#pragma GCC visibility push(hidden)
namespace ircd::db
{
struct throw_on_error;
@ -137,15 +143,7 @@ namespace ircd::db
void commit(database &, rocksdb::WriteBatch &, const sopts &);
void append(rocksdb::WriteBatch &, column &, const column::delta &delta);
void append(rocksdb::WriteBatch &, const cell::delta &delta);
}
#include "db_has.h"
#include "db_port.h"
#include "db_env.h"
#include "db_env_state.h"
namespace ircd::db
{
const descriptor &describe(const database::column &);
const std::string &name(const database::column &);
uint32_t id(const database::column &);
@ -156,10 +154,12 @@ namespace ircd::db
std::shared_ptr<const database::column> shared_from(const database::column &);
std::shared_ptr<database::column> shared_from(database::column &);
}
#pragma GCC visibility pop
#ifdef IRCD_DB_HAS_ALLOCATOR
/// Dynamic memory
struct ircd::db::database::allocator final
struct [[gnu::visibility("hidden")]]
ircd::db::database::allocator final
:rocksdb::MemoryAllocator
{
static const size_t ALIGN_DEFAULT;
@ -190,7 +190,8 @@ struct ircd::db::database::allocator final
};
#endif
struct ircd::db::database::cache final
struct [[gnu::visibility("hidden")]]
ircd::db::database::cache final
:rocksdb::Cache
{
using Slice = rocksdb::Slice;
@ -241,7 +242,8 @@ struct ircd::db::database::cache final
~cache() noexcept override;
};
struct ircd::db::database::comparator final
struct [[gnu::visibility("hidden")]]
ircd::db::database::comparator final
:rocksdb::Comparator
{
using Slice = rocksdb::Slice;
@ -260,7 +262,8 @@ struct ircd::db::database::comparator final
comparator(database *const &d, db::comparator user);
};
struct ircd::db::database::prefix_transform final
struct [[gnu::visibility("hidden")]]
ircd::db::database::prefix_transform final
:rocksdb::SliceTransform
{
using Slice = rocksdb::Slice;
@ -281,7 +284,8 @@ struct ircd::db::database::prefix_transform final
{}
};
struct ircd::db::database::mergeop final
struct [[gnu::visibility("hidden")]]
ircd::db::database::mergeop final
:std::enable_shared_from_this<struct ircd::db::database::mergeop>
,rocksdb::AssociativeMergeOperator
{
@ -295,7 +299,8 @@ struct ircd::db::database::mergeop final
~mergeop() noexcept;
};
struct ircd::db::database::compaction_filter final
struct [[gnu::visibility("hidden")]]
ircd::db::database::compaction_filter final
:rocksdb::CompactionFilter
{
using Slice = rocksdb::Slice;
@ -312,7 +317,8 @@ struct ircd::db::database::compaction_filter final
~compaction_filter() noexcept override;
};
struct ircd::db::database::stats final
struct [[gnu::visibility("hidden")]]
ircd::db::database::stats final
:rocksdb::Statistics
{
static constexpr auto NUM_TICKER { rocksdb::TICKER_ENUM_MAX };
@ -349,7 +355,8 @@ struct ircd::db::database::stats final
~stats() noexcept;
};
struct ircd::db::database::stats::passthru final
struct [[gnu::visibility("hidden")]]
ircd::db::database::stats::passthru final
:rocksdb::Statistics
{
std::array<rocksdb::Statistics *, 2> pass {{nullptr}};
@ -367,7 +374,8 @@ struct ircd::db::database::stats::passthru final
~passthru() noexcept;
};
struct ircd::db::database::column final
struct [[gnu::visibility("hidden")]]
ircd::db::database::column final
:std::enable_shared_from_this<database::column>
,rocksdb::ColumnFamilyDescriptor
{
@ -400,7 +408,8 @@ struct ircd::db::database::column final
~column() noexcept;
};
struct ircd::db::txn::handler
struct [[gnu::visibility("hidden")]]
ircd::db::txn::handler
:rocksdb::WriteBatch::Handler
{
using Status = rocksdb::Status;
@ -433,7 +442,8 @@ struct ircd::db::txn::handler
};
/// Callback surface for iterating/recovering the write-ahead-log journal.
struct ircd::db::database::wal_filter
struct [[gnu::visibility("hidden")]]
ircd::db::database::wal_filter
:rocksdb::WalFilter
{
using WriteBatch = rocksdb::WriteBatch;
@ -455,7 +465,8 @@ struct ircd::db::database::wal_filter
~wal_filter() noexcept;
};
struct ircd::db::database::events final
struct [[gnu::visibility("hidden")]]
ircd::db::database::events final
:std::enable_shared_from_this<struct ircd::db::database::events>
,rocksdb::EventListener
{
@ -479,7 +490,8 @@ struct ircd::db::database::events final
{}
};
struct ircd::db::database::logger final
struct [[gnu::visibility("hidden")]]
ircd::db::database::logger final
:std::enable_shared_from_this<struct database::logger>
,rocksdb::Logger
{
@ -495,7 +507,8 @@ struct ircd::db::database::logger final
~logger() noexcept override;
};
struct ircd::db::database::rate_limiter
struct [[gnu::visibility("hidden")]]
ircd::db::database::rate_limiter
:std::enable_shared_from_this<struct database::rate_limiter>
,rocksdb::RateLimiter
{
@ -526,12 +539,14 @@ struct ircd::db::database::rate_limiter
// util
//
struct ircd::db::throw_on_error
struct [[gnu::visibility("hidden")]]
ircd::db::throw_on_error
{
throw_on_error(const rocksdb::Status & = rocksdb::Status::OK());
};
struct ircd::db::error_to_status
struct [[gnu::visibility("hidden")]]
ircd::db::error_to_status
:rocksdb::Status
{
error_to_status(const std::error_code &);

View file

@ -10,7 +10,8 @@
/// Internal environment hookup.
///
struct ircd::db::database::env final
struct [[gnu::visibility("hidden")]]
ircd::db::database::env final
:rocksdb::Env
{
struct writable_file;
@ -93,7 +94,8 @@ struct ircd::db::database::env final
~env() noexcept;
};
struct ircd::db::database::env::directory final
struct [[gnu::visibility("hidden")]]
ircd::db::database::env::directory final
:rocksdb::Directory
{
using Status = rocksdb::Status;
@ -107,7 +109,8 @@ struct ircd::db::database::env::directory final
~directory() noexcept;
};
struct ircd::db::database::env::file_lock final
struct [[gnu::visibility("hidden")]]
ircd::db::database::env::file_lock final
:rocksdb::FileLock
{
database &d;
@ -116,7 +119,8 @@ struct ircd::db::database::env::file_lock final
~file_lock() noexcept;
};
struct ircd::db::database::env::random_access_file final
struct [[gnu::visibility("hidden")]]
ircd::db::database::env::random_access_file final
:rocksdb::RandomAccessFile
{
using Status = rocksdb::Status;
@ -146,7 +150,8 @@ struct ircd::db::database::env::random_access_file final
~random_access_file() noexcept;
};
struct ircd::db::database::env::random_rw_file final
struct [[gnu::visibility("hidden")]]
ircd::db::database::env::random_rw_file final
:rocksdb::RandomRWFile
{
using Status = rocksdb::Status;
@ -175,7 +180,8 @@ struct ircd::db::database::env::random_rw_file final
~random_rw_file() noexcept;
};
struct ircd::db::database::env::sequential_file final
struct [[gnu::visibility("hidden")]]
ircd::db::database::env::sequential_file final
:rocksdb::SequentialFile
{
using Status = rocksdb::Status;
@ -203,7 +209,8 @@ struct ircd::db::database::env::sequential_file final
~sequential_file() noexcept;
};
struct ircd::db::database::env::writable_file
struct [[gnu::visibility("hidden")]]
ircd::db::database::env::writable_file
:rocksdb::WritableFile
{
using Status = rocksdb::Status;
@ -251,7 +258,8 @@ struct ircd::db::database::env::writable_file
~writable_file() noexcept;
};
struct ircd::db::database::env::writable_file_direct final
struct [[gnu::visibility("hidden")]]
ircd::db::database::env::writable_file_direct final
:writable_file
{
size_t alignment {0};

View file

@ -11,7 +11,8 @@
#pragma once
#define HAVE_IRCD_DB_ENV_STATE_H
struct ircd::db::database::env::state
struct [[gnu::visibility("hidden")]]
ircd::db::database::env::state
{
struct task;
struct pool;
@ -30,7 +31,8 @@ struct ircd::db::database::env::state
~state() noexcept;
};
struct ircd::db::database::env::state::pool
struct [[gnu::visibility("hidden")]]
ircd::db::database::env::state::pool
{
using Priority = rocksdb::Env::Priority;
using IOPriority = rocksdb::Env::IOPriority;
@ -60,7 +62,8 @@ struct ircd::db::database::env::state::pool
~pool() noexcept;
};
struct ircd::db::database::env::state::task
struct [[gnu::visibility("hidden")]]
ircd::db::database::env::state::task
{
void (*func)(void *arg);
void (*cancel)(void *arg);