Lines Matching refs:thread

554     ThreadState* thread;  member
561 ThreadState* thread = arg->thread; in ThreadBody() local
573 thread->stats.Start(); in ThreadBody()
574 (arg->bm->*(arg->method))(thread); in ThreadBody()
575 thread->stats.Stop(); in ThreadBody()
599 arg[i].thread = new ThreadState(i); in RunBenchmark()
600 arg[i].thread->shared = &shared; in RunBenchmark()
617 arg[0].thread->stats.Merge(arg[i].thread->stats); in RunBenchmark()
619 arg[0].thread->stats.Report(name); in RunBenchmark()
622 delete arg[i].thread; in RunBenchmark()
627 void Crc32c(ThreadState* thread) { in Crc32c() argument
636 thread->stats.FinishedSingleOp(); in Crc32c()
642 thread->stats.AddBytes(bytes); in Crc32c()
643 thread->stats.AddMessage(label); in Crc32c()
646 void AcquireLoad(ThreadState* thread) { in AcquireLoad() argument
651 thread->stats.AddMessage("(each op is 1000 loads)"); in AcquireLoad()
657 thread->stats.FinishedSingleOp(); in AcquireLoad()
662 void SnappyCompress(ThreadState* thread) { in SnappyCompress() argument
673 thread->stats.FinishedSingleOp(); in SnappyCompress()
677 thread->stats.AddMessage("(snappy failure)"); in SnappyCompress()
682 thread->stats.AddMessage(buf); in SnappyCompress()
683 thread->stats.AddBytes(bytes); in SnappyCompress()
687 void SnappyUncompress(ThreadState* thread) { in SnappyUncompress() argument
698 thread->stats.FinishedSingleOp(); in SnappyUncompress()
703 thread->stats.AddMessage("(snappy failure)"); in SnappyUncompress()
705 thread->stats.AddBytes(bytes); in SnappyUncompress()
728 void OpenBench(ThreadState* thread) { in OpenBench() argument
732 thread->stats.FinishedSingleOp(); in OpenBench()
736 void WriteSeq(ThreadState* thread) { in WriteSeq() argument
737 DoWrite(thread, true); in WriteSeq()
740 void WriteRandom(ThreadState* thread) { in WriteRandom() argument
741 DoWrite(thread, false); in WriteRandom()
744 void DoWrite(ThreadState* thread, bool seq) { in DoWrite() argument
748 thread->stats.AddMessage(msg); in DoWrite()
758 const int k = seq ? i+j : (thread->rand.Next() % FLAGS_num); in DoWrite()
763 thread->stats.FinishedSingleOp(); in DoWrite()
771 thread->stats.AddBytes(bytes); in DoWrite()
774 void ReadSequential(ThreadState* thread) { in ReadSequential() argument
780 thread->stats.FinishedSingleOp(); in ReadSequential()
784 thread->stats.AddBytes(bytes); in ReadSequential()
787 void ReadReverse(ThreadState* thread) { in ReadReverse() argument
793 thread->stats.FinishedSingleOp(); in ReadReverse()
797 thread->stats.AddBytes(bytes); in ReadReverse()
800 void ReadRandom(ThreadState* thread) { in ReadRandom() argument
806 const int k = thread->rand.Next() % FLAGS_num; in ReadRandom()
811 thread->stats.FinishedSingleOp(); in ReadRandom()
815 thread->stats.AddMessage(msg); in ReadRandom()
818 void ReadMissing(ThreadState* thread) { in ReadMissing() argument
823 const int k = thread->rand.Next() % FLAGS_num; in ReadMissing()
826 thread->stats.FinishedSingleOp(); in ReadMissing()
830 void ReadHot(ThreadState* thread) { in ReadHot() argument
836 const int k = thread->rand.Next() % range; in ReadHot()
839 thread->stats.FinishedSingleOp(); in ReadHot()
843 void SeekRandom(ThreadState* thread) { in SeekRandom() argument
849 const int k = thread->rand.Next() % FLAGS_num; in SeekRandom()
854 thread->stats.FinishedSingleOp(); in SeekRandom()
858 thread->stats.AddMessage(msg); in SeekRandom()
861 void DoDelete(ThreadState* thread, bool seq) { in DoDelete() argument
868 const int k = seq ? i+j : (thread->rand.Next() % FLAGS_num); in DoDelete()
872 thread->stats.FinishedSingleOp(); in DoDelete()
882 void DeleteSeq(ThreadState* thread) { in DeleteSeq() argument
883 DoDelete(thread, true); in DeleteSeq()
886 void DeleteRandom(ThreadState* thread) { in DeleteRandom() argument
887 DoDelete(thread, false); in DeleteRandom()
890 void ReadWhileWriting(ThreadState* thread) { in ReadWhileWriting() argument
891 if (thread->tid > 0) { in ReadWhileWriting()
892 ReadRandom(thread); in ReadWhileWriting()
898 MutexLock l(&thread->shared->mu); in ReadWhileWriting()
899 if (thread->shared->num_done + 1 >= thread->shared->num_initialized) { in ReadWhileWriting()
905 const int k = thread->rand.Next() % FLAGS_num; in ReadWhileWriting()
916 thread->stats.Start(); in ReadWhileWriting()
920 void Compact(ThreadState* thread) { in Compact() argument