Browse Source

tracing: fix -Wunused-private-field warning

Remove `external_buffer_` from `InternalTraceBuffer` as it seems not to
be used anywhere.

PR-URL: https://github.com/nodejs/node/pull/10416
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
v7.x
Santiago Gimeno 8 years ago
committed by Italo A. Casas
parent
commit
3dc4a5f1f4
No known key found for this signature in database GPG Key ID: 23EFEFE93C4CFFFE
  1. 9
      src/tracing/node_trace_buffer.cc
  2. 4
      src/tracing/node_trace_buffer.h

9
src/tracing/node_trace_buffer.cc

@ -4,10 +4,9 @@ namespace node {
namespace tracing {
InternalTraceBuffer::InternalTraceBuffer(size_t max_chunks, uint32_t id,
NodeTraceWriter* trace_writer, NodeTraceBuffer* external_buffer)
NodeTraceWriter* trace_writer)
: flushing_(false), max_chunks_(max_chunks),
trace_writer_(trace_writer), external_buffer_(external_buffer),
id_(id) {
trace_writer_(trace_writer), id_(id) {
chunks_.resize(max_chunks);
}
@ -90,8 +89,8 @@ void InternalTraceBuffer::ExtractHandle(
NodeTraceBuffer::NodeTraceBuffer(size_t max_chunks,
NodeTraceWriter* trace_writer, uv_loop_t* tracing_loop)
: tracing_loop_(tracing_loop), trace_writer_(trace_writer),
buffer1_(max_chunks, 0, trace_writer, this),
buffer2_(max_chunks, 1, trace_writer, this) {
buffer1_(max_chunks, 0, trace_writer),
buffer2_(max_chunks, 1, trace_writer) {
current_buf_.store(&buffer1_);
flush_signal_.data = this;

4
src/tracing/node_trace_buffer.h

@ -20,8 +20,7 @@ class NodeTraceBuffer;
class InternalTraceBuffer {
public:
InternalTraceBuffer(size_t max_chunks, uint32_t id,
NodeTraceWriter* trace_writer,
NodeTraceBuffer* external_buffer);
NodeTraceWriter* trace_writer);
TraceObject* AddTraceEvent(uint64_t* handle);
TraceObject* GetEventByHandle(uint64_t handle);
@ -44,7 +43,6 @@ class InternalTraceBuffer {
bool flushing_;
size_t max_chunks_;
NodeTraceWriter* trace_writer_;
NodeTraceBuffer* external_buffer_;
std::vector<std::unique_ptr<TraceBufferChunk>> chunks_;
size_t total_chunks_ = 0;
uint32_t current_chunk_seq_ = 1;

Loading…
Cancel
Save