Home
last modified time | relevance | path

Searched refs:Counter (Results 1 – 25 of 110) sorted by relevance

12345

/openbsd-src/gnu/llvm/llvm/tools/llvm-exegesis/lib/
H A DPerfHelper.cpp97 Counter::Counter(PerfEvent &&E) : Event(std::move(E)){ in Counter() function in llvm::exegesis::pfm::Counter
114 Counter::~Counter() { close(FileDescriptor); } in ~Counter()
116 void Counter::start() { ioctl(FileDescriptor, PERF_EVENT_IOC_RESET, 0); } in start()
118 void Counter::stop() { ioctl(FileDescriptor, PERF_EVENT_IOC_DISABLE, 0); } in stop()
120 int64_t Counter::read() const { in read()
132 Counter::readOrError(StringRef /*unused*/) const { in readOrError()
143 int Counter::numValues() const { return 1; } in numValues()
146 Counter::Counter(PerfEvent &&Event) : Event(std::move(Event)) {} in Counter() function in llvm::exegesis::pfm::Counter
148 Counter::~Counter() = default;
150 void Counter::start() {} in start()
[all …]
H A DPerfHelper.h70 class Counter {
73 explicit Counter(PerfEvent &&event);
75 Counter(const Counter &) = delete;
76 Counter(Counter &&other) = default;
78 virtual ~Counter();
H A DBenchmarkRunner.cpp84 pfm::Counter *Counter = CounterOrError.get().get(); in runAndSample() local
86 Reserved = Counter->numValues(); in runAndSample()
88 } else if (Reserved != Counter->numValues()) in runAndSample()
93 .concat(std::to_string(Counter->numValues())) in runAndSample()
101 const bool Crashed = !CRC.RunSafely([this, Counter, ScratchPtr]() { in runAndSample()
102 Counter->start(); in runAndSample()
104 Counter->stop(); in runAndSample()
123 auto ValueOrError = Counter->readOrError(Function.getFunctionBytes()); in runAndSample()
H A DUopsBenchmarkRunner.cpp26 if (!IssueCounter->Counter) in runMeasurements()
28 auto ExpectedCounterValue = Executor.runAndMeasure(IssueCounter->Counter); in runMeasurements()
/openbsd-src/gnu/llvm/clang/lib/CodeGen/
H A DCoverageMappingGen.cpp97 Counter Count;
100 std::optional<Counter> FalseCount;
113 SourceMappingRegion(Counter Count, std::optional<SourceLocation> LocStart, in SourceMappingRegion()
119 SourceMappingRegion(Counter Count, std::optional<Counter> FalseCount, in SourceMappingRegion()
126 const Counter &getCounter() const { return Count; } in getCounter()
128 const Counter &getFalseCounter() const { in getFalseCounter()
133 void setCounter(Counter C) { Count = C; } in setCounter()
520 SourceRegions.emplace_back(Counter(), Start, End); in VisitDecl()
560 Counter GapRegionCounter;
563 Counter subtractCounters(Counter LHS, Counter RHS, bool Simplify = true) { in subtractCounters()
[all …]
/openbsd-src/gnu/llvm/llvm/include/llvm/ProfileData/Coverage/
H A DCoverageMapping.h96 struct Counter { struct
109 Counter(CounterKind Kind, unsigned ID) : Kind(Kind), ID(ID) {} in Counter() function
112 Counter() = default;
124 friend bool operator==(const Counter &LHS, const Counter &RHS) { argument
128 friend bool operator!=(const Counter &LHS, const Counter &RHS) {
132 friend bool operator<(const Counter &LHS, const Counter &RHS) {
137 static Counter getZero() { return Counter(); } in getZero() argument
140 static Counter getCounter(unsigned CounterId) { in getCounter() argument
141 return Counter(CounterValueReference, CounterId); in getCounter()
146 static Counter getExpression(unsigned ExpressionId) { in getExpression() argument
[all …]
/openbsd-src/gnu/llvm/llvm/lib/ProfileData/Coverage/
H A DCoverageMappingWriter.cpp91 void mark(Counter C) { in mark()
100 void gatherUsed(Counter C) { in gatherUsed()
114 Counter adjust(Counter C) const { in adjust()
116 C = Counter::getExpression(AdjustedExpressionIDs[C.getExpressionID()]); in adjust()
138 Counter C) { in encodeCounter()
144 (std::numeric_limits<unsigned>::max() >> Counter::EncodingTagBits)); in encodeCounter()
145 return Tag | (ID << Counter::EncodingTagBits); in encodeCounter()
148 static void writeCounter(ArrayRef<CounterExpression> Expressions, Counter C, in writeCounter()
205 Counter Count = Minimizer.adjust(I->Count); in write()
206 Counter FalseCount = Minimizer.adjust(I->FalseCount); in write()
[all …]
H A DCoverageMapping.cpp46 Counter CounterExpressionBuilder::get(const CounterExpression &E) { in get()
49 return Counter::getExpression(It->second); in get()
53 return Counter::getExpression(I); in get()
56 void CounterExpressionBuilder::extractTerms(Counter C, int Factor, in extractTerms()
59 case Counter::Zero: in extractTerms()
61 case Counter::CounterValueReference: in extractTerms()
64 case Counter::Expression: in extractTerms()
73 Counter CounterExpressionBuilder::simplify(Counter ExpressionTree) { in simplify()
81 return Counter::getZero(); in simplify()
100 Counter C; in simplify()
[all …]
H A DCoverageMappingReader.cpp186 Error RawCoverageMappingReader::decodeCounter(unsigned Value, Counter &C) { in decodeCounter()
187 auto Tag = Value & Counter::EncodingTagMask; in decodeCounter()
189 case Counter::Zero: in decodeCounter()
190 C = Counter::getZero(); in decodeCounter()
192 case Counter::CounterValueReference: in decodeCounter()
193 C = Counter::getCounter(Value >> Counter::EncodingTagBits); in decodeCounter()
198 Tag -= Counter::Expression; in decodeCounter()
202 auto ID = Value >> Counter::EncodingTagBits; in decodeCounter()
206 C = Counter::getExpression(ID); in decodeCounter()
215 Error RawCoverageMappingReader::readCounter(Counter &C) { in readCounter()
[all …]
/openbsd-src/gnu/usr.bin/perl/ext/XS-APItest/t/
H A DnewCONSTSUB.t75 package Counter {
92 is($Counter::count, 0, 'No objects exist before we start');
94 ($const, $glob) = $sub->(\%::, $name, 0, Counter->new());
96 is($Counter::count, 1, '1 object now exists');
101 is($Counter::count, 0, 'no objects remain');
H A Dxsub_h.t95 package Counter;
108 my $var = Counter->new();
/openbsd-src/gnu/llvm/compiler-rt/lib/gwp_asan/tests/
H A Dmutex_test.cpp55 unsigned *Counter, in synchronousIncrementTask() argument
62 (*Counter)++; in synchronousIncrementTask()
73 unsigned Counter = 0; in runSynchronisedTest() local
76 Threads.emplace_back(synchronousIncrementTask, &StartingGun, &Mu, &Counter, in runSynchronisedTest()
83 EXPECT_EQ(CounterMax, Counter); in runSynchronisedTest()
/openbsd-src/gnu/llvm/compiler-rt/lib/fuzzer/
H A DFuzzerTracePC.h213 unsigned CounterToFeature(T Counter) { in CounterToFeature() argument
225 assert(Counter); in CounterToFeature()
227 /**/ if (Counter >= 128) Bit = 7; in CounterToFeature()
228 else if (Counter >= 32) Bit = 6; in CounterToFeature()
229 else if (Counter >= 16) Bit = 5; in CounterToFeature()
230 else if (Counter >= 8) Bit = 4; in CounterToFeature()
231 else if (Counter >= 4) Bit = 3; in CounterToFeature()
232 else if (Counter >= 3) Bit = 2; in CounterToFeature()
233 else if (Counter >= 2) Bit = 1; in CounterToFeature()
241 size_t Idx, uint8_t Counter) { in CollectFeatures()
[all …]
/openbsd-src/gnu/llvm/llvm/lib/Support/
H A DDebugCounter.cpp113 CounterInfo &Counter = Counters[CounterID]; in push_back() local
114 Counter.Skip = CounterVal; in push_back()
115 Counter.IsSet = true; in push_back()
126 CounterInfo &Counter = Counters[CounterID]; in push_back() local
127 Counter.StopAfter = CounterVal; in push_back()
128 Counter.IsSet = true; in push_back()
/openbsd-src/gnu/usr.bin/binutils-2.17/cpu/
H A Diq10.cpu566 ; Counter manager instructions (IQ10)
568 (dni cm32and "Counter Manager And" (MACH10 USES-RS USES-RT USES-RD)
574 (dni cm32andn "Counter Manager And With Inverse" (MACH10 USES-RS USES-RT USES-RD)
580 (dni cm32or "Counter Manager Or" (MACH10 USES-RS USES-RT USES-RD)
586 (dni cm32ra "Counter Manager 32-bit Rolling Add" (MACH10 USES-RS USES-RT USES-RD)
592 (dni cm32rd "Counter Manager 32-bit Rolling Decrement" (MACH10 USES-RT USES-RD)
598 (dni cm32ri "Counter Manager 32-bit Rolling Increment" (MACH10 USES-RT USES-RD)
604 (dni cm32rs "Counter Manager 32-bit Rolling Subtract" (MACH10 USES-RS USES-RT USES-RD)
610 (dni cm32sa "Counter Manager 32-bit Saturating Add" (MACH10 USES-RS USES-RT USES-RD)
616 (dni cm32sd "Counter Manager 32-bit Saturating Decrement" (MACH10 USES-RT USES-RD)
[all …]
/openbsd-src/gnu/usr.bin/binutils/cpu/
H A Diq10.cpu566 ; Counter manager instructions (IQ10)
568 (dni cm32and "Counter Manager And" (MACH10 USES-RS USES-RT USES-RD)
574 (dni cm32andn "Counter Manager And With Inverse" (MACH10 USES-RS USES-RT USES-RD)
580 (dni cm32or "Counter Manager Or" (MACH10 USES-RS USES-RT USES-RD)
586 (dni cm32ra "Counter Manager 32-bit Rolling Add" (MACH10 USES-RS USES-RT USES-RD)
592 (dni cm32rd "Counter Manager 32-bit Rolling Decrement" (MACH10 USES-RT USES-RD)
598 (dni cm32ri "Counter Manager 32-bit Rolling Increment" (MACH10 USES-RT USES-RD)
604 (dni cm32rs "Counter Manager 32-bit Rolling Subtract" (MACH10 USES-RS USES-RT USES-RD)
610 (dni cm32sa "Counter Manager 32-bit Saturating Add" (MACH10 USES-RS USES-RT USES-RD)
616 (dni cm32sd "Counter Manager 32-bit Saturating Decrement" (MACH10 USES-RT USES-RD)
[all …]
/openbsd-src/gnu/llvm/llvm/utils/TableGen/
H A DCallingConvEmitter.cpp23 unsigned Counter; member in __anondd53867c0111::CallingConvEmitter
82 Counter = 0; in EmitCallingConv()
164 O << IndentStr << "static const MCPhysReg RegList" << ++Counter in EmitAction()
178 << Counter << ")) {\n"; in EmitAction()
219 unsigned RegListNumber = ++Counter; in EmitAction()
220 unsigned ShadowRegListNumber = ++Counter; in EmitAction()
250 O << IndentStr << "unsigned Offset" << ++Counter in EmitAction()
269 << Counter << ", LocVT, LocInfo));\n"; in EmitAction()
276 unsigned ShadowRegListNumber = ++Counter; in EmitAction()
286 O << IndentStr << "unsigned Offset" << ++Counter in EmitAction()
[all …]
H A DExegesisEmitter.cpp66 const llvm::StringRef Counter = PfmCounterDef->getValueAsString("Counter"); in collectPfmCounters() local
67 if (!Counter.empty()) in collectPfmCounters()
68 PfmCounterNameTable.emplace(Counter, 0); in collectPfmCounters()
/openbsd-src/gnu/llvm/compiler-rt/lib/xray/tests/unit/
H A Dsegmented_array_test.cpp215 auto Counter = Max; in TEST() local
220 EXPECT_EQ(TopNode, &Dummy) << "Counter = " << Counter; in TEST()
222 --Counter; in TEST()
223 ASSERT_EQ(Data.size(), size_t(Counter)); in TEST()
252 auto Counter = Max; in TEST() local
257 EXPECT_EQ(TopNode, &Dummy) << "Counter = " << Counter; in TEST()
259 --Counter; in TEST()
260 ASSERT_EQ(Data->size(), size_t(Counter)); in TEST()
291 Counter = Max; in TEST()
296 EXPECT_EQ(TopNode, &Dummy) << "Counter = " << Counter; in TEST()
[all …]
H A Dbuffer_queue_test.cpp172 std::atomic<int> Counter{0}; in TEST() local
185 Counter.fetch_add(1, std::memory_order_acq_rel); in TEST()
192 Counter.fetch_sub(1, std::memory_order_acq_rel); in TEST()
201 Counter.fetch_add(1, std::memory_order_acq_rel); in TEST()
207 Counter.fetch_sub(1, std::memory_order_acq_rel); in TEST()
214 while (Counter.load(std::memory_order_acquire) != 2) in TEST()
221 while (Counter.load(std::memory_order_acquire) != 0) in TEST()
230 ASSERT_EQ(Counter.load(std::memory_order_acquire), 0); in TEST()
/openbsd-src/gnu/llvm/clang/lib/StaticAnalyzer/Core/
H A DWorkList.cpp210 unsigned long Counter = 0; member in __anon59a745250411::UnexploredFirstPriorityQueue
234 queue.push(std::make_pair(U, std::make_pair(-NumVisited, ++Counter))); in enqueue()
266 unsigned long Counter = 0; member in __anon59a745250511::UnexploredFirstPriorityLocationQueue
286 queue.push(std::make_pair(U, std::make_pair(-NumVisited, ++Counter))); in enqueue()
/openbsd-src/gnu/llvm/clang/lib/Analysis/FlowSensitive/
H A DDebugSupport.cpp91 : Counter(0), AtomNames(std::move(AtomNamesArg)) { in DebugStringGenerator()
222 auto Entry = AtomNames.try_emplace(Atom, formatv("B{0}", Counter)); in getAtomName()
224 Counter++; in getAtomName()
231 size_t Counter; member in clang::dataflow::__anon4d876d890111::DebugStringGenerator
/openbsd-src/gnu/llvm/llvm/tools/llvm-profgen/
H A DPerfReader.cpp738 auto SCounterPrinter = [&](RangeSample &Counter, StringRef Separator, in writeUnsymbolizedProfile()
741 OS << Counter.size() << "\n"; in writeUnsymbolizedProfile()
742 for (auto &I : Counter) { in writeUnsymbolizedProfile()
770 SampleCounter &Counter = *CI.second; in writeUnsymbolizedProfile() local
771 SCounterPrinter(Counter.RangeCounter, "-", Indent); in writeUnsymbolizedProfile()
772 SCounterPrinter(Counter.BranchCounter, "->", Indent); in writeUnsymbolizedProfile()
805 auto ReadCounter = [&](RangeSample &Counter, StringRef Separator) { in readSampleCounters() argument
835 Counter[{Source, Target}] += Count; in readSampleCounters()
869 SampleCounter &Counter = SampleCounters.begin()->second; in computeCounterFromLBR() local
879 Counter.recordBranchCount(SourceAddress, TargetAddress, Repeat); in computeCounterFromLBR()
[all …]
/openbsd-src/gnu/llvm/llvm/include/llvm/ADT/
H A DGenericCycleImpl.h302 unsigned Counter = 0; in dfs() local
320 bool Added = BlockDFSInfo.try_emplace(Block, ++Counter).second; in dfs()
324 LLVM_DEBUG(errs() << " preorder number: " << Counter << "\n"); in dfs()
328 LLVM_DEBUG(errs() << " ended at " << Counter << "\n"); in dfs()
329 BlockDFSInfo.find(Block)->second.End = Counter; in dfs()
/openbsd-src/gnu/llvm/lldb/examples/summaries/cocoa/
H A Dmetrics.py36 class Counter: class
86 self.metrics[name] = Counter()

12345