Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
runtime-profile.h File Reference
#include <boost/function.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/unordered_map.hpp>
#include <iostream>
#include <sys/time.h>
#include <sys/resource.h>
#include "common/atomic.h"
#include "common/logging.h"
#include "common/object-pool.h"
#include "util/thread.h"
#include "util/stopwatch.h"
#include "util/streaming-sampler.h"
#include "gen-cpp/RuntimeProfile_types.h"
Include dependency graph for runtime-profile.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  impala::RuntimeProfile
 
class  impala::RuntimeProfile::Counter
 
class  impala::RuntimeProfile::HighWaterMarkCounter
 
class  impala::RuntimeProfile::DerivedCounter
 
class  impala::RuntimeProfile::AveragedCounter
 
class  impala::RuntimeProfile::ThreadCounters
 A set of counters that measure thread info, such as total time, user time, sys time. More...
 
class  impala::RuntimeProfile::EventSequence
 
class  impala::RuntimeProfile::TimeSeriesCounter
 
class  impala::ScopedEvent
 Utility class to mark an event when the object is destroyed. More...
 
class  impala::ScopedCounter
 
class  impala::ScopedTimer< T >
 
class  impala::ThreadCounterMeasurement
 

Namespaces

 impala
 This file contains type definitions that are used throughout the code base.
 

Macros

#define ENABLE_COUNTERS   1
 
#define CONCAT_IMPL(x, y)   x##y
 Some macro magic to generate unique ids using COUNTER More...
 
#define MACRO_CONCAT(x, y)   CONCAT_IMPL(x, y)
 
#define ADD_COUNTER(profile, name, unit)   (profile)->AddCounter(name, unit)
 
#define ADD_TIME_SERIES_COUNTER(profile, name, src_counter)   (profile)->AddTimeSeriesCounter(name, src_counter)
 
#define ADD_TIMER(profile, name)   (profile)->AddCounter(name, TUnit::TIME_NS)
 
#define ADD_CHILD_TIMER(profile, name, parent)   (profile)->AddCounter(name, TUnit::TIME_NS, parent)
 
#define SCOPED_TIMER(c)   ScopedTimer<MonotonicStopWatch> MACRO_CONCAT(SCOPED_TIMER, __COUNTER__)(c)
 
#define COUNTER_ADD(c, v)   (c)->Add(v)
 
#define COUNTER_SET(c, v)   (c)->Set(v)
 
#define ADD_THREAD_COUNTERS(profile, prefix)   (profile)->AddThreadCounters(prefix)
 
#define SCOPED_THREAD_COUNTER_MEASUREMENT(c)
 

Macro Definition Documentation

#define ADD_CHILD_TIMER (   profile,
  name,
  parent 
)    (profile)->AddCounter(name, TUnit::TIME_NS, parent)
#define ADD_THREAD_COUNTERS (   profile,
  prefix 
)    (profile)->AddThreadCounters(prefix)

Definition at line 57 of file runtime-profile.h.

Referenced by impala::ScanNode::Prepare().

#define ADD_TIME_SERIES_COUNTER (   profile,
  name,
  src_counter 
)    (profile)->AddTimeSeriesCounter(name, src_counter)
#define CONCAT_IMPL (   x,
 
)    x##y

Some macro magic to generate unique ids using COUNTER

Definition at line 43 of file runtime-profile.h.

#define COUNTER_ADD (   c,
 
)    (c)->Add(v)

Definition at line 55 of file runtime-profile.h.

Referenced by impala::DataStreamRecvr::SenderQueue::AddBatch(), DataPartitioner::AddData(), DataPartitioner::Allocate(), impala::HdfsSequenceTableWriter::AppendRowBatch(), impala::HdfsTextTableWriter::AppendRowBatch(), impala::HdfsAvroTableWriter::AppendRowBatch(), impala::HdfsParquetScanner::AssembleRows(), impala::PartitionedHashJoinNode::Partition::BuildHashTableInternal(), impala::BaseSequenceScanner::CloseFileRanges(), impala::PartitionedAggregationNode::CreateHashPartitions(), impala::HdfsTableSink::CreateNewTmpFile(), impala::HdfsParquetTableWriter::Finalize(), impala::HdfsTextScanner::FinishScanRange(), impala::HBaseTableScanner::GetFamily(), impala::HBaseScanNode::GetNext(), impala::CrossJoinNode::GetNext(), impala::HashJoinNode::GetNext(), impala::PlanFragmentExecutor::GetNextInternal(), impala::HBaseTableScanner::GetQualifier(), impala::HBaseTableScanner::GetRowKey(), impala::HBaseTableScanner::GetValue(), impala::HdfsTableSink::InitOutputPartition(), impala::HashJoinNode::LeftJoinGetNext(), impala::LlvmCodeGen::LoadModule(), DataProvider::NextBatch(), impala::PartitionedAggregationNode::NextPartition(), impala::PartitionedHashJoinNode::NextProbeRowBatch(), impala::BlockingJoinNode::Open(), impala::PartitionedHashJoinNode::PrepareNextPartition(), impala::PartitionedHashJoinNode::ProcessBuildInput(), impala::HdfsSequenceScanner::ProcessDecompressedBlock(), impala::HdfsParquetScanner::ProcessFooter(), impala::HdfsTextScanner::ProcessRange(), impala::HdfsAvroScanner::ProcessRange(), impala::HdfsSequenceScanner::ProcessRange(), impala::HdfsRCFileScanner::ProcessRange(), impala::BaseSequenceScanner::ProcessSplit(), impala::DiskIoMgr::ScanRange::ReadFromCache(), impala::DiskIoMgr::ReadRange(), impala::HdfsScanNode::ScannerThread(), impala::DataStreamSender::SerializeBatch(), impala::PartitionedAggregationNode::Partition::Spill(), impala::PartitionedHashJoinNode::Partition::Spill(), DataPartitioner::Split(), impala::HdfsScanNode::ThreadTokenAvailableCb(), and impala::HdfsTableWriter::Write().

#define ENABLE_COUNTERS   1

Define macros for updating counters. The macros make it very easy to disable all counters at compile time. Set this to 0 to remove counters. This is useful to do to make sure the counters aren't affecting the system.

Definition at line 40 of file runtime-profile.h.

#define MACRO_CONCAT (   x,
 
)    CONCAT_IMPL(x, y)

Definition at line 44 of file runtime-profile.h.

#define SCOPED_THREAD_COUNTER_MEASUREMENT (   c)
Value:
#define SCOPED_THREAD_COUNTER_MEASUREMENT(c)
#define MACRO_CONCAT(x, y)

Definition at line 58 of file runtime-profile.h.

Referenced by impala::HBaseScanNode::GetNext(), and impala::HdfsScanNode::ScannerThread().

#define SCOPED_TIMER (   c)    ScopedTimer<MonotonicStopWatch> MACRO_CONCAT(SCOPED_TIMER, __COUNTER__)(c)

Definition at line 53 of file runtime-profile.h.

Referenced by impala::DataStreamRecvr::SenderQueue::AddBatch(), DataPartitioner::AddData(), impala::HBaseTableWriter::AppendRowBatch(), impala::HdfsSequenceTableWriter::AppendRowBatch(), impala::HdfsTextTableWriter::AppendRowBatch(), impala::HdfsParquetTableWriter::AppendRowBatch(), impala::HdfsAvroTableWriter::AppendRowBatch(), impala::PartitionedHashJoinNode::Partition::BuildHashTableInternal(), impala::BlockingJoinNode::BuildSideThread(), impala::HBaseTableSink::Close(), impala::HBaseScanNode::Close(), impala::DataSourceScanNode::Close(), impala::HdfsTableSink::Close(), impala::HdfsAvroScanner::CodegenDecodeAvroData(), impala::PartitionedAggregationNode::CodegenProcessBatch(), impala::AggregationNode::CodegenProcessRowBatch(), impala::AggregationNode::CodegenUpdateTuple(), impala::PartitionedAggregationNode::CodegenUpdateTuple(), impala::HdfsScanner::CodegenWriteAlignedTuples(), impala::HdfsScanner::CodegenWriteCompleteTuple(), impala::TextConverter::CodegenWriteSlot(), impala::CrossJoinNode::ConstructBuildSide(), impala::HashJoinNode::ConstructBuildSide(), impala::HdfsSequenceTableWriter::ConsumeRow(), impala::HdfsTableSink::CreateNewTmpFile(), impala::BufferedBlockMgr::Decrypt(), impala::BufferedBlockMgr::Encrypt(), impala::PartitionedHashJoinNode::EvaluateNullProbe(), impala::CatalogOpExecutor::Exec(), impala::CatalogOpExecutor::ExecComputeStats(), impala::ImpalaServer::QueryExecState::FetchRowsInternal(), impala::HdfsTextScanner::FillByteBufferCompressedFile(), impala::HdfsTextScanner::FillByteBufferGzip(), impala::ExchangeNode::FillInputRowBatch(), impala::HdfsParquetTableWriter::Finalize(), DataPartitioner::Finalize(), impala::HdfsParquetTableWriter::BaseColumnWriter::FinalizeCurrentPage(), impala::LlvmCodeGen::FinalizeModule(), impala::HdfsTableSink::FinalizePartitionFile(), impala::BufferedBlockMgr::FindBuffer(), impala::HdfsTextScanner::FindFirstTuple(), impala::HdfsTextTableWriter::Flush(), impala::HdfsSequenceTableWriter::Flush(), impala::HdfsAvroTableWriter::Flush(), impala::HdfsParquetTableWriter::BaseColumnWriter::Flush(), impala::DataStreamRecvr::SenderQueue::GetBatch(), impala::SelectNode::GetNext(), impala::SortNode::GetNext(), impala::UnionNode::GetNext(), impala::HBaseScanNode::GetNext(), impala::TopNNode::GetNext(), impala::ExchangeNode::GetNext(), impala::CrossJoinNode::GetNext(), impala::DataSourceScanNode::GetNext(), impala::HashJoinNode::GetNext(), impala::AggregationNode::GetNext(), impala::AnalyticEvalNode::GetNext(), impala::PartitionedHashJoinNode::GetNext(), impala::PartitionedAggregationNode::GetNext(), impala::HdfsScanNode::GetNext(), impala::ScannerContext::Stream::GetNextBuffer(), impala::PlanFragmentExecutor::GetNextInternal(), impala::AnalyticEvalNode::GetNextOutputBatch(), impala::HdfsSequenceScanner::GetRecord(), impala::RuntimeState::Init(), impala::LlvmCodeGen::LinkModule(), impala::LlvmCodeGen::LoadFromFile(), impala::LlvmCodeGen::LoadImpalaIR(), impala::LlvmCodeGen::LoadModule(), impala::BufferedTupleStream::NewBlockForWrite(), impala::HBaseTableScanner::Next(), impala::BufferedTupleStream::NextBlockForRead(), impala::SelectNode::Open(), impala::HBaseScanNode::Open(), impala::SortNode::Open(), impala::UnionNode::Open(), impala::TopNNode::Open(), impala::ExchangeNode::Open(), impala::DataSourceScanNode::Open(), impala::BlockingJoinNode::Open(), impala::AggregationNode::Open(), impala::AnalyticEvalNode::Open(), impala::PartitionedAggregationNode::Open(), impala::PlanFragmentExecutor::OpenInternal(), impala::LlvmCodeGen::OptimizeModule(), impala::PartitionedHashJoinNode::OutputUnmatchedBuild(), impala::BufferedBlockMgr::PinBlock(), impala::BufferedTupleStream::PinStream(), impala::SelectNode::Prepare(), impala::HBaseTableSink::Prepare(), impala::SortNode::Prepare(), impala::UnionNode::Prepare(), impala::TopNNode::Prepare(), impala::BlockingJoinNode::Prepare(), impala::HashJoinNode::Prepare(), impala::AggregationNode::Prepare(), impala::PartitionedHashJoinNode::Prepare(), impala::AnalyticEvalNode::Prepare(), impala::DataStreamSender::Prepare(), impala::ScanNode::Prepare(), impala::PlanFragmentExecutor::Prepare(), impala::PartitionedAggregationNode::Prepare(), impala::HdfsScanNode::Prepare(), impala::HdfsTableSink::Prepare(), impala::BufferedTupleStream::PrepareForRead(), impala::PartitionedAggregationNode::ProcessBatch(), impala::PartitionedHashJoinNode::ProcessBuildInput(), impala::AnalyticEvalNode::ProcessChildBatch(), impala::HdfsSequenceScanner::ProcessDecompressedBlock(), impala::HdfsTextScanner::ProcessRange(), impala::HdfsAvroScanner::ProcessRange(), impala::HdfsSequenceScanner::ProcessRange(), impala::HdfsRCFileScanner::ProcessRange(), impala::HdfsRCFileScanner::ReadColumnBuffers(), impala::HdfsSequenceScanner::ReadCompressedBlock(), impala::HdfsParquetScanner::BaseColumnReader::ReadDataPage(), impala::HdfsRCFileScanner::ReadKeyBuffers(), impala::DiskIoMgr::ReadRange(), impala::HdfsScanNode::ScannerThread(), impala::HBaseTableScanner::ScanSetup(), impala::HBaseTableSink::Send(), impala::DataStreamSender::Send(), impala::HdfsTableSink::Send(), impala::DataStreamSender::SerializeBatch(), impala::BufferedBlockMgr::SetHash(), impala::Sorter::SortRun(), impala::DataStreamSender::Channel::TransmitDataHelper(), impala::BufferedTupleStream::UnpinBlock(), impala::BufferedTupleStream::UnpinStream(), impala::ImpalaServer::QueryExecState::UpdateCatalog(), impala::BufferedBlockMgr::VerifyHash(), impala::DataStreamSender::Channel::WaitForRpc(), impala::HdfsSequenceTableWriter::WriteCompressedBlock(), and impala::HdfsTextScanner::WriteFields().