Lines Matching refs:tid
218 std::atomic<int> tid(0); in TEST() local
220 tid = gettid(); in TEST()
224 while (tid == 0); in TEST()
225 ASSERT_TRUE(StatCmd()->Run({"-t", std::to_string(tid), "--in-app"})); in TEST()
380 int tid = 0; member
392 if (thread_map_.count(arg.tid) == 0) { in AddCounter()
393 ThreadInfo& thread = thread_map_[arg.tid]; in AddCounter()
394 thread.pid = thread.tid = arg.tid; in AddCounter()
395 thread.name = "thread" + std::to_string(arg.tid); in AddCounter()
405 counter.tid = arg.tid; in AddCounter()
443 AddCounter({.tid = 0, .cpu = 0, .value = 1, .time_enabled = 1, .time_running = 1}); in TEST_F()
444 AddCounter({.tid = 0, .cpu = 1, .value = 1, .time_enabled = 1, .time_running = 1}); in TEST_F()
445 AddCounter({.tid = 1, .cpu = 0, .value = 1, .time_enabled = 1, .time_running = 1}); in TEST_F()
446 AddCounter({.tid = 1, .cpu = 1, .value = 2, .time_enabled = 2, .time_running = 1}); in TEST_F()
454 AddCounter({.tid = 0, .cpu = 0, .value = 1, .time_enabled = 1, .time_running = 1}); in TEST_F()
455 AddCounter({.tid = 0, .cpu = 1, .value = 1, .time_enabled = 1, .time_running = 1}); in TEST_F()
456 AddCounter({.tid = 1, .cpu = 0, .value = 1, .time_enabled = 1, .time_running = 1}); in TEST_F()
457 AddCounter({.tid = 1, .cpu = 1, .value = 2, .time_enabled = 2, .time_running = 1}); in TEST_F()
460 ASSERT_EQ(summaries[0].thread->tid, 1); in TEST_F()
464 ASSERT_EQ(summaries[1].thread->tid, 0); in TEST_F()
471 AddCounter({.tid = 0, .cpu = 0, .value = 1, .time_enabled = 1, .time_running = 1}); in TEST_F()
472 AddCounter({.tid = 0, .cpu = 1, .value = 1, .time_enabled = 1, .time_running = 1}); in TEST_F()
473 AddCounter({.tid = 1, .cpu = 0, .value = 1, .time_enabled = 1, .time_running = 1}); in TEST_F()
474 AddCounter({.tid = 1, .cpu = 1, .value = 2, .time_enabled = 2, .time_running = 1}); in TEST_F()
488 AddCounter({.tid = 0, .cpu = 0, .value = 1, .time_enabled = 1, .time_running = 1}); in TEST_F()
489 AddCounter({.tid = 0, .cpu = 1, .value = 2, .time_enabled = 1, .time_running = 1}); in TEST_F()
490 AddCounter({.tid = 1, .cpu = 0, .value = 3, .time_enabled = 1, .time_running = 1}); in TEST_F()
491 AddCounter({.tid = 1, .cpu = 1, .value = 4, .time_enabled = 2, .time_running = 1}); in TEST_F()
494 ASSERT_EQ(summaries[0].thread->tid, 1); in TEST_F()
498 ASSERT_EQ(summaries[1].thread->tid, 1); in TEST_F()
502 ASSERT_EQ(summaries[2].thread->tid, 0); in TEST_F()
506 ASSERT_EQ(summaries[3].thread->tid, 0); in TEST_F()
514 AddCounter({.tid = 0, .cpu = 0, .value = 1}); in TEST_F()
515 AddCounter({.tid = 1, .cpu = 1, .value = 2}); in TEST_F()
523 AddCounter({.tid = 0, .cpu = 0, .value = 1}); in TEST_F()
524 AddCounter({.tid = 0, .cpu = 1, .value = 5}); in TEST_F()
525 AddCounter({.tid = 1, .cpu = 0, .value = 3}); in TEST_F()
534 AddCounter({.tid = 0, .cpu = 1, .value = 2}); in TEST_F()
535 AddCounter({.tid = 1, .cpu = 0, .value = 1}); in TEST_F()
542 AddCounter({.tid = 0, .cpu = 0, .value = 1}); in TEST_F()
543 AddCounter({.tid = 1, .cpu = 0, .value = 2}); in TEST_F()
555 void AddSummary(const std::string event_name, pid_t tid, int cpu, uint64_t count, in AddSummary() argument
558 if (tid != -1) { in AddSummary()
559 thread = &thread_map_[tid]; in AddSummary()