Home | History | Annotate | Download | only in test

Lines Matching refs:Query

83   analyzer->FindEvents(Query::Bool(true), &found);
146 Query event_pid = Query::EventPidIs(event.thread.process_id);
147 Query event_tid = Query::EventTidIs(event.thread.thread_id);
148 Query event_time = Query::EventTimeIs(event.timestamp);
149 Query event_duration = Query::EventDurationIs(duration);
150 Query event_phase = Query::EventPhaseIs(event.phase);
151 Query event_category = Query::EventCategoryIs(event.category);
152 Query event_name = Query::EventNameIs(event.name);
153 Query event_id = Query::EventIdIs(event.id);
154 Query event_has_arg1 = Query::EventHasNumberArg("num");
155 Query event_has_arg2 = Query::EventHasStringArg("str");
156 Query event_arg1 =
157 (Query::EventArg("num") == Query::Double(event.arg_numbers["num"]));
158 Query event_arg2 =
159 (Query::EventArg("str") == Query::String(event.arg_strings["str"]));
160 Query event_has_other = Query::EventHasOther();
161 Query other_pid = Query::OtherPidIs(other.thread.process_id);
162 Query other_tid = Query::OtherTidIs(other.thread.thread_id);
163 Query other_time = Query::OtherTimeIs(other.timestamp);
164 Query other_phase = Query::OtherPhaseIs(other.phase);
165 Query other_category = Query::OtherCategoryIs(other.category);
166 Query other_name = Query::OtherNameIs(other.name);
167 Query other_id = Query::OtherIdIs(other.id);
168 Query other_has_arg1 = Query::OtherHasNumberArg("num2");
169 Query other_has_arg2 = Query::OtherHasStringArg("str2");
170 Query other_arg1 =
171 (Query::OtherArg("num2") == Query::Double(other.arg_numbers["num2"]));
172 Query other_arg2 =
173 (Query::OtherArg("str2") == Query::String(other.arg_strings["str2"]));
238 analyzer->FindEvents(Query::EventCategory() == Query::String("cat1"), &found);
243 analyzer->FindEvents(Query::EventArg("num") == Query::Int(2), &found);
249 analyzer->FindEvents(Query::EventCategory() != Query::String("cat1"), &found);
254 analyzer->FindEvents(Query::EventArg("num") != Query::Int(2), &found);
261 analyzer->FindEvents(Query::EventArg("num") < Query::Int(2), &found);
266 analyzer->FindEvents(Query::EventArg("num") <= Query::Int(2), &found);
272 analyzer->FindEvents(Query::EventArg("num") > Query::Int(3), &found);
277 analyzer->FindEvents(Query::EventArg("num") >= Query::Int(4), &found);
282 analyzer->FindEvents(Query::EventName() != Query::String("name1") &&
283 Query::EventArg("num") < Query::Int(3), &found);
288 analyzer->FindEvents(Query::EventName() == Query::String("name1") ||
289 Query::EventArg("num") == Query::Int(3), &found);
295 analyzer->FindEvents(!(Query::EventName() == Query::String("name1") ||
296 Query::EventArg("num") == Query::Int(3)), &found);
329 analyzer->FindEvents(Query::EventArg("a") + Query::EventArg("b") ==
330 Query::Int(20), &found);
335 analyzer->FindEvents(Query::EventArg("a") - Query::EventArg("b") ==
336 Query::Int(5), &found);
341 analyzer->FindEvents(Query::EventArg("a") * Query::EventArg("b") ==
342 Query::Int(50), &found);
347 analyzer->FindEvents(Query::EventArg("a") / Query::EventArg("b") ==
348 Query::Int(2), &found);
353 analyzer->FindEvents(Query::EventArg("a") % Query::EventArg("b") ==
354 Query::Int(0), &found);
358 analyzer->FindEvents(-Query::EventArg("b") == Query::Int(-10), &found);
382 analyzer->FindEvents(Query::EventName() == Query::Pattern("name?"), &found);
387 analyzer->FindEvents(Query::EventName() == Query::Pattern("name*"), &found);
393 analyzer->FindEvents(Query::EventName() != Query::Pattern("name*"), &found);
409 TRACE_EVENT_BEGIN0("cat1", "name1"); // found by duration query
412 TRACE_EVENT_BEGIN0("cat2", "name3"); // found by duration query
418 TRACE_EVENT_END0("cat2", "name3"); // found by duration query
421 TRACE_EVENT_END0("cat1", "name1"); // found by duration query
432 Query::MatchBeginWithEnd() &&
433 Query::EventDuration() >
434 Query::Int(static_cast<int>(duration_cutoff_us)) &&
435 (Query::EventCategory() == Query::String("cat1") ||
436 Query::EventCategory() == Query::String("cat2") ||
437 Query::EventCategory() == Query::String("cat3")),
455 TRACE_EVENT0("cat1", "name1"); // found by duration query
458 TRACE_EVENT0("cat2", "name3"); // found by duration query
474 Query::EventCompleteDuration() >
475 Query::Int(static_cast<int>(duration_cutoff_us)) &&
476 (Query::EventCategory() == Query::String("cat1") ||
477 Query::EventCategory() == Query::String("cat2") ||
478 Query::EventCategory() == Query::String("cat3")),
505 analyzer->FindEvents(Query::MatchBeginWithEnd(), &found);
528 analyzer->FindEvents(Query::MatchBeginName("name1"), &found);
561 analyzer->FindEvents(Query::MatchAsyncBeginWithNext(), &found);
593 analyzer->FindEvents(Query::MatchAsyncBeginWithNext(), &found);
645 Query begin(Query::EventName() == Query::String("begin"));
646 Query end(Query::EventName() == Query::String("end"));
647 Query match(Query::EventArg("id") == Query::OtherArg("id"));
653 analyzer->FindEvents(Query::EventCategory() == Query::String("cat1") &&
654 Query::EventHasOther(), &found);
658 analyzer->FindEvents(Query::EventCategory() == Query::String("cat1") &&
659 !Query::EventHasOther(), &found);
663 analyzer->FindEvents(Query::EventCategory() == Query::String("cat6") &&
664 !Query::EventHasOther(), &found);
668 analyzer->FindEvents(Query::EventCategory() == Query::String("cat2") &&
669 Query::OtherCategory() == Query::String("cat4"), &found);
673 analyzer->FindEvents(Query::EventCategory() == Query::String("cat4") &&
674 Query::OtherCategory() == Query::String("cat2"), &found);
678 analyzer->FindEvents(Query::EventCategory() == Query::String("cat3") &&
679 Query::OtherCategory() == Query::String("cat5"), &found);
683 analyzer->FindEvents(Query::EventCategory() == Query::String("cat5") &&
684 Query::OtherCategory() == Query::String("cat3"), &found);
688 // Verify that Query literals and types are properly casted.
697 EXPECT_TRUE((Query::Double(5.0) == Query::Int(char_num)).Evaluate(dummy));
698 EXPECT_TRUE((Query::Double(-5.0) == Query::Int(short_num)).Evaluate(dummy));
699 EXPECT_TRUE((Query::Double(1.0) == Query::Uint(1u)).Evaluate(dummy));
700 EXPECT_TRUE((Query::Double(1.0) == Query::Int(1)).Evaluate(dummy));
701 EXPECT_TRUE((Query::Double(-1.0) == Query::Int(-1)).Evaluate(dummy));
702 EXPECT_TRUE((Query::Double(1.0) == Query::Double(1.0f)).Evaluate(dummy));
703 EXPECT_TRUE((Query::Bool(true) == Query::Int(1)).Evaluate(dummy));
704 EXPECT_TRUE((Query::Bool(false) == Query::Int(0)).Evaluate(dummy));
705 EXPECT_TRUE((Query::Bool(true) == Query::Double(1.0f)).Evaluate(dummy));
706 EXPECT_TRUE((Query::Bool(false) == Query::Double(0.0f)).Evaluate(dummy));
788 EXPECT_FALSE(FindFirstOf(event_ptrs, Query::Bool(true), 0, &index));
789 EXPECT_FALSE(FindFirstOf(event_ptrs, Query::Bool(true), 10, &index));
790 EXPECT_FALSE(FindLastOf(event_ptrs, Query::Bool(true), 0, &index));
791 EXPECT_FALSE(FindLastOf(event_ptrs, Query::Bool(true), 10, &index));
799 Query query_bam = Query::EventName() == Query::String(events[bam_index].name);
802 EXPECT_FALSE(FindFirstOf(event_ptrs, Query::Bool(false), 0, &index));
803 EXPECT_TRUE(FindFirstOf(event_ptrs, Query::Bool(true), 0, &index));
805 EXPECT_TRUE(FindFirstOf(event_ptrs, Query::Bool(true), 5, &index));
815 EXPECT_FALSE(FindLastOf(event_ptrs, Query::Bool(false), 1000, &index));
816 EXPECT_TRUE(FindLastOf(event_ptrs, Query::Bool(true), 1000, &index));
818 EXPECT_TRUE(FindLastOf(event_ptrs, Query::Bool(true), num_events - 5,
834 EXPECT_FALSE(FindClosest(event_ptrs, Query::Bool(true), 0,
849 Query query_named = Query::EventName() != Query::String(std::string());
850 Query query_one = Query::EventName() == Query::String("one");
874 EXPECT_EQ(0u, CountMatches(event_ptrs, Query::Bool(true), 0, 10));
885 Query query_named = Query::EventName() != Query::String(std::string());
886 Query query_one = Query::EventName() == Query::String("one");
888 EXPECT_EQ(0u, CountMatches(event_ptrs, Query::Bool(false)));
889 EXPECT_EQ(num_events, CountMatches(event_ptrs, Query::Bool(true)));
890 EXPECT_EQ(num_events - 1, CountMatches(event_ptrs, Query::Bool(true),