CUBRID Engine  latest
thread_entry.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2008 Search Solution Corporation
3  * Copyright 2016 CUBRID Corporation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 /*
20  * thread_entry - implementation for thread contextual cache.
21  */
22 
23 #include "thread_entry.hpp"
24 
25 #include "adjustable_array.h"
26 #include "critical_section.h" // for INF_WAIT
28 #include "error_manager.h"
29 #include "fault_injection.h"
30 #include "list_file.h"
31 #include "lock_free.h"
33 #include "log_compress.h"
34 #include "log_system_tran.hpp"
35 #include "memory_alloc.h"
36 #include "page_buffer.h"
37 #include "resource_tracker.hpp"
38 
39 #include <cstring>
40 #include <sstream>
41 
42 #if !defined (WINDOWS)
43 #include <pthread.h>
44 #endif // WINDOWS
45 
46 namespace cubthread
47 {
49  // resource tracker dedicated section
50  // todo - normally each tracker should be moved to its own module
52 
53  // enable trackers in SERVER_MODE && debug
54  static const bool ENABLE_TRACKERS =
55 #if !defined (NDEBUG) && defined (SERVER_MODE)
56  true;
57 #else // RELEASE or !SERVER_MODE
58  false;
59 #endif // RELEASE or !SERVER_MODE
60 
61  // tracker constants
62  // alloc
63  const char *ALLOC_TRACK_NAME = "Virtual Memory";
64  const char *ALLOC_TRACK_RES_NAME = "res_ptr";
65  const std::size_t ALLOC_TRACK_MAX_ITEMS = 32767;
66 
67  // page buffer
68  const char *PGBUF_TRACK_NAME = "Page Buffer";
69  const char *PGBUF_TRACK_RES_NAME = "pgptr";
70  const std::size_t PGBUF_TRACK_MAX_ITEMS = 1024;
71  const unsigned PGBUF_TRACK_MAX_AMOUNT = 16; // re-fix is possible... how many to accept is debatable
72 
74  // entry implementation
76 
78  // public:
79  : index (-1)
80  , type (TT_WORKER)
81  , emulate_tid ()
82  , client_id (-1)
83  , tran_index (NULL_TRAN_INDEX)
84  , private_lru_index (-1)
85  , tran_index_lock ()
86  , rid (0)
87  , m_status (status::TS_DEAD)
88  , th_entry_lock ()
89  , wakeup_cond ()
90  , private_heap_id (0)
91  , cnv_adj_buffer ()
92  , conn_entry (NULL)
93  , xasl_unpack_info_ptr (NULL)
94  , xasl_errcode (0)
95  , xasl_recursion_depth (0)
96  , rand_seed (0)
97  , rand_buf ()
98  , resume_status (THREAD_RESUME_NONE)
99  , request_latch_mode (PGBUF_NO_LATCH)
100  , request_fix_count (0)
101  , victim_request_fail (false)
102  , interrupted (false)
103  , shutdown (false)
104  , check_interrupt (true)
105  , wait_for_latch_promote (false)
106  , next_wait_thrd (NULL)
107  , lockwait (NULL)
108  , lockwait_stime (0)
109  , lockwait_msecs (0)
110  , lockwait_state (-1)
111  , query_entry (NULL)
112  , tran_next_wait (NULL)
113  , worker_thrd_list (NULL)
114  , log_zip_undo (NULL)
115  , log_zip_redo (NULL)
116  , log_data_ptr (NULL)
117  , log_data_length (0)
118  , no_logging (false)
119  , net_request_index (-1)
120  , vacuum_worker (NULL)
121  , sort_stats_active (false)
122  , event_stats ()
123  , trace_format (0)
124  , on_trace (false)
125  , clear_trace (false)
126  , tran_entries ()
127 #if !defined (NDEBUG)
128  , fi_test_array (NULL)
129  , count_private_allocators (0)
130 #endif /* DEBUG */
131  , m_qlist_count (0)
132  , m_loaddb_driver (NULL)
133  // private:
134  , m_id ()
135  , m_error ()
136  , m_cleared (false)
137  , m_alloc_tracker (*new cubbase::alloc_tracker (ALLOC_TRACK_NAME, ENABLE_TRACKERS, ALLOC_TRACK_MAX_ITEMS,
138  ALLOC_TRACK_RES_NAME))
139  , m_pgbuf_tracker (*new cubbase::pgbuf_tracker (PGBUF_TRACK_NAME, ENABLE_TRACKERS, PGBUF_TRACK_MAX_ITEMS,
140  PGBUF_TRACK_RES_NAME, PGBUF_TRACK_MAX_AMOUNT))
141  , m_csect_tracker (*new cubsync::critical_section_tracker (ENABLE_TRACKERS))
142  , m_systdes (NULL)
143  , m_lf_tran_index (lockfree::tran::INVALID_INDEX)
144  {
146  {
147  // cannot recover from this
148  assert (false);
149  }
151  {
152  // cannot recover from this
153  assert (false);
154  }
155  if (pthread_cond_init (&wakeup_cond, NULL) != 0)
156  {
157  // cannot recover from this
158  assert (false);
159  }
160 
162 
163  cnv_adj_buffer[0] = NULL;
164  cnv_adj_buffer[1] = NULL;
165  cnv_adj_buffer[2] = NULL;
166 
167  struct timeval t;
168  gettimeofday (&t, NULL);
169  rand_seed = (unsigned int) t.tv_usec;
170  srand48_r ((long) t.tv_usec, &rand_buf);
171 
172  std::memset (&event_stats, 0, sizeof (event_stats));
173 
174  /* lock-free transaction entries */
185 
186 #if !defined (NDEBUG)
187  fi_thread_init (this);
188 #endif /* DEBUG */
189  }
190 
192  {
193  clear_resources ();
194 
195  delete &m_alloc_tracker;
196  delete &m_pgbuf_tracker;
197  delete &m_csect_tracker;
198  }
199 
200  void
202  {
203  /* lock-free transaction entries */
215  }
216 
217  void
219  {
220  if (m_cleared)
221  {
222  return;
223  }
224  for (int i = 0; i < 3; i++)
225  {
226  if (cnv_adj_buffer[i] != NULL)
227  {
229  }
230  }
232  {
233  assert (false);
234  }
236  {
237  assert (false);
238  }
239  if (pthread_cond_destroy (&wakeup_cond) != 0)
240  {
241  assert (false);
242  }
243 
244  if (log_zip_undo != NULL)
245  {
247  }
248  if (log_zip_redo != NULL)
249  {
251  }
252  if (log_data_ptr != NULL)
253  {
254  free (log_data_ptr);
255  }
256 
257  no_logging = false;
258 
260 
262 
263 #if !defined (NDEBUG)
264  for (int i = 0; i < THREAD_TS_COUNT; i++)
265  {
266  assert (tran_entries[i] == NULL);
267  }
268 #endif // DEBUG
269 
270 #if !defined (NDEBUG)
271  fi_thread_final (this);
272 #endif // DEBUG
273 
274  assert (m_systdes == NULL);
275 
276  m_cleared = true;
277  }
278 
281  {
282  return m_id;
283  }
284 
285  pthread_t
287  {
288  pthread_t thread_id = 0;
289 
290  if (m_id != thread_id_t ())
291  {
292  std::ostringstream oss;
293  oss << m_id;
294  thread_id = (pthread_t) std::stoul (oss.str ());
295  }
296 
297  return thread_id;
298  }
299 
300  void
302  {
303  m_id = std::this_thread::get_id ();
304 
305 #if defined (SERVER_MODE)
306  // native thread identifier must be equal to identifier of std::this_thread
307  assert (get_posix_id () == pthread_self ());
308 #endif /* SERVER_MODE */
309  }
310 
311  void
313  {
314  m_id = thread_id_t ();
315  }
316 
317  bool
319  {
320  return m_id == std::this_thread::get_id ();
321  }
322 
323  void
325  {
326  for (std::size_t i = 0; i < THREAD_TS_COUNT; i++)
327  {
328  if (tran_entries[i] != NULL)
329  {
331  tran_entries[i] = NULL;
332  }
333  }
334  }
335 
336  void
337  entry::lock (void)
338  {
340  }
341 
342  void
344  {
346  }
347 
348  void
350  {
351  if (!ENABLE_TRACKERS)
352  {
353  // all trackers are activated by this flag
354  return;
355  }
359  m_qlist_count = 0;
360  }
361 
362  void
364  {
365  if (!ENABLE_TRACKERS)
366  {
367  // all trackers are activated by this flag
368  return;
369  }
373  }
374 
375  void
377  {
378  if (!ENABLE_TRACKERS)
379  {
380  // all trackers are activated by this flag
381  return;
382  }
386  }
387 
388  void
390  {
391  assert (m_systdes == NULL);
392  m_systdes = new log_system_tdes ();
394  }
395 
396  void
398  {
399  delete m_systdes;
400  m_systdes = NULL;
402  }
403 
404  void
406  {
407  m_lf_tran_index = idx;
408  }
409 
412  {
415  return ret;
416  }
417 
420  {
421  return m_lf_tran_index;
422  }
423 
424 } // namespace cubthread
425 
427 // legacy C functions
429 
430 using thread_clock_type = std::chrono::system_clock;
431 
432 static void thread_wakeup_internal (cubthread::entry *thread_p, thread_resume_suspend_status resume_reason,
433  bool had_mutex);
435  thread_resume_suspend_status resume_reason,
436  thread_resume_suspend_status suspend_reason,
437  bool had_mutex);
438 
439 // todo - remove timeval and use std::chrono
440 static void
441 thread_timeval_add_usec (const std::chrono::microseconds &usec, struct timeval &tv)
442 {
443  const long ratio = 1000000;
444 
445  // add all usecs to tv_usec
446  tv.tv_usec += (long) usec.count ();
447  // move seconds from tv_usec to tv_sec
448  tv.tv_sec = tv.tv_usec / ratio;
449  tv.tv_usec = tv.tv_usec % ratio;
450 }
451 
452 /*
453  * thread_suspend_wakeup_and_unlock_entry() -
454  * return:
455  * thread_p(in):
456  * suspended_reason(in):
457  *
458  * Note: this function must be called by current thread also, the lock must have already been acquired.
459  */
460 void
462 {
463  cubthread::entry::status old_status;
464 
465  thread_clock_type::time_point start_time_pt;
466  std::chrono::microseconds usecs;
467 
470  old_status = thread_p->m_status;
472 
473  thread_p->resume_status = suspended_reason;
474 
475  if (thread_p->event_stats.trace_slow_query == true)
476  {
477  start_time_pt = thread_clock_type::now ();
478  }
479 
480  pthread_cond_wait (&thread_p->wakeup_cond, &thread_p->th_entry_lock);
481 
482  if (thread_p->event_stats.trace_slow_query == true)
483  {
484  usecs = std::chrono::duration_cast<std::chrono::microseconds> (thread_clock_type::now () - start_time_pt);
485 
486  if (suspended_reason == THREAD_LOCK_SUSPENDED)
487  {
489  }
490  else if (suspended_reason == THREAD_PGBUF_SUSPENDED)
491  {
493  }
494  }
495 
496  thread_p->m_status = old_status;
497 
498  pthread_mutex_unlock (&thread_p->th_entry_lock);
499 }
500 
501 /*
502  * thread_suspend_timeout_wakeup_and_unlock_entry() -
503  * return:
504  * thread_p(in):
505  * time_p(in):
506  * suspended_reason(in):
507  */
508 int
510  thread_resume_suspend_status suspended_reason)
511 {
512  int r;
513  cubthread::entry::status old_status;
514  int error = NO_ERROR;
515 
518  old_status = thread_p->m_status;
520 
521  thread_p->resume_status = suspended_reason;
522 
523  r = pthread_cond_timedwait (&thread_p->wakeup_cond, &thread_p->th_entry_lock, time_p);
524 
525  if (r != 0 && r != ETIMEDOUT)
526  {
529  }
530 
531  if (r == ETIMEDOUT)
532  {
534  }
535 
536  thread_p->m_status = old_status;
537 
538  pthread_mutex_unlock (&thread_p->th_entry_lock);
539 
540  return error;
541 }
542 
543 /*
544  * thread_wakeup_internal () -
545  * return:
546  * thread_p(in/out):
547  * resume_reason:
548  */
549 static void
550 thread_wakeup_internal (cubthread::entry *thread_p, thread_resume_suspend_status resume_reason, bool had_mutex)
551 {
552  if (had_mutex == false)
553  {
554  thread_lock_entry (thread_p);
555  }
556 
557  pthread_cond_signal (&thread_p->wakeup_cond);
558  thread_p->resume_status = resume_reason;
559 
560  if (had_mutex == false)
561  {
562  thread_unlock_entry (thread_p);
563  }
564 }
565 
566 /*
567  * thread_check_suspend_reason_and_wakeup_internal () -
568  * return:
569  * thread_p(in):
570  * resume_reason:
571  * suspend_reason:
572  * had_mutex:
573  */
574 static void
576  thread_resume_suspend_status resume_reason,
577  thread_resume_suspend_status suspend_reason, bool had_mutex)
578 {
579  if (had_mutex == false)
580  {
581  thread_lock_entry (thread_p);
582  }
583 
584  if (thread_p->resume_status != suspend_reason)
585  {
586  thread_unlock_entry (thread_p);
587  return;
588  }
589 
590  pthread_cond_signal (&thread_p->wakeup_cond);
591 
592  thread_p->resume_status = resume_reason;
593 
594  thread_unlock_entry (thread_p);
595 }
596 
597 /*
598  * thread_wakeup () -
599  * return:
600  * thread_p(in/out):
601  * resume_reason:
602  */
603 void
605 {
606  thread_wakeup_internal (thread_p, resume_reason, false);
607 }
608 
609 void
611  thread_resume_suspend_status suspend_reason)
612 {
613  thread_check_suspend_reason_and_wakeup_internal (thread_p, resume_reason, suspend_reason, false);
614 }
615 
616 /*
617  * thread_wakeup_already_had_mutex () -
618  * return:
619  * thread_p(in/out):
620  * resume_reason:
621  */
622 void
624 {
625  thread_wakeup_internal (thread_p, resume_reason, true);
626 }
627 
628 /*
629  * thread_suspend_with_other_mutex() -
630  * return: 0 if no error, or error code
631  * thread_p(in):
632  * mutex_p():
633  * timeout(in):
634  * to(in):
635  * suspended_reason(in):
636  */
637 int
638 thread_suspend_with_other_mutex (cubthread::entry *thread_p, pthread_mutex_t *mutex_p, int timeout,
639  struct timespec *to, thread_resume_suspend_status suspended_reason)
640 {
641  int r = 0;
642  cubthread::entry::status old_status;
643  int error = NO_ERROR;
644 
645  assert (thread_p != NULL);
646  old_status = thread_p->m_status;
647 
648  pthread_mutex_lock (&thread_p->th_entry_lock);
649 
651  thread_p->resume_status = suspended_reason;
652 
653  pthread_mutex_unlock (&thread_p->th_entry_lock);
654 
655  if (timeout == INF_WAIT)
656  {
657  pthread_cond_wait (&thread_p->wakeup_cond, mutex_p);
658  }
659  else
660  {
661  r = pthread_cond_timedwait (&thread_p->wakeup_cond, mutex_p, to);
662  }
663 
664  /* we should restore thread's status */
665  if (r != NO_ERROR)
666  {
667  error = (r == ETIMEDOUT) ? ER_CSS_PTHREAD_COND_TIMEDOUT : ER_CSS_PTHREAD_COND_WAIT;
668  if (timeout == INF_WAIT || r != ETIMEDOUT)
669  {
671  }
672  }
673 
674  pthread_mutex_lock (&thread_p->th_entry_lock);
675 
676  thread_p->m_status = old_status;
677 
678  pthread_mutex_unlock (&thread_p->th_entry_lock);
679 
680  assert (error == NO_ERROR || error == ER_CSS_PTHREAD_COND_TIMEDOUT);
681 
682  return error;
683 }
684 
685 /*
686  * thread_type_to_string () - Translate thread type into string
687  * representation
688  * return:
689  * type(in): thread type
690  */
691 const char *
693 {
694  switch (type)
695  {
696  case TT_MASTER:
697  return "MASTER";
698  case TT_SERVER:
699  return "SERVER";
700  case TT_WORKER:
701  return "WORKER";
702  case TT_DAEMON:
703  return "DAEMON";
704  case TT_LOADDB:
705  return "LOADDB";
706  case TT_VACUUM_MASTER:
707  return "VACUUM_MASTER";
708  case TT_VACUUM_WORKER:
709  return "VACUUM_WORKER";
710  case TT_NONE:
711  return "NONE";
712  }
713  return "UNKNOWN";
714 }
715 
716 /*
717  * thread_status_to_string () - Translate thread status into string
718  * representation
719  * return:
720  * type(in): thread type
721  */
722 const char *
724 {
725  switch (status)
726  {
728  return "DEAD";
730  return "FREE";
732  return "RUN";
734  return "WAIT";
736  return "CHECK";
737  }
738  return "UNKNOWN";
739 }
740 
741 /*
742  * thread_resume_status_to_string () - Translate thread resume status into
743  * string representation
744  * return:
745  * type(in): thread type
746  */
747 const char *
749 {
750  switch (resume_status)
751  {
752  case THREAD_RESUME_NONE:
753  return "RESUME_NONE";
755  return "RESUME_DUE_TO_INTERRUPT";
757  return "RESUME_DUE_TO_SHUTDOWN";
759  return "PGBUF_SUSPENDED";
761  return "PGBUF_RESUMED";
763  return "JOB_QUEUE_SUSPENDED";
765  return "JOB_QUEUE_RESUMED";
767  return "CSECT_READER_SUSPENDED";
769  return "CSECT_READER_RESUMED";
771  return "CSECT_WRITER_SUSPENDED";
773  return "CSECT_WRITER_RESUMED";
775  return "CSECT_PROMOTER_SUSPENDED";
777  return "CSECT_PROMOTER_RESUMED";
779  return "CSS_QUEUE_SUSPENDED";
781  return "CSS_QUEUE_RESUMED";
783  return "HEAP_CLSREPR_SUSPENDED";
785  return "HEAP_CLSREPR_RESUMED";
787  return "LOCK_SUSPENDED";
788  case THREAD_LOCK_RESUMED:
789  return "LOCK_RESUMED";
791  return "LOGWR_SUSPENDED";
793  return "LOGWR_RESUMED";
795  return "ALLOC_BCB_SUSPENDED";
797  return "ALLOC_BCB_RESUMED";
799  return "DWB_BLOCK_QUEUE_SUSPENDED";
801  return "DWB_BLOCK_QUEUE_RESUMED";
802  }
803  return "UNKNOWN";
804 }
#define NO_ERROR
Definition: error_code.h:46
void return_lock_free_transaction_entries(void)
static LOG_ZIP * log_zip_redo
Definition: log_append.cpp:36
static const index INVALID_INDEX
const std::size_t PGBUF_TRACK_MAX_ITEMS
static void thread_timeval_add_usec(const std::chrono::microseconds &usec, struct timeval &tv)
void assign_lf_tran_index(lockfree::tran::index idx)
void pop_resource_tracks(void)
lf_tran_entry * tran_entries[THREAD_TS_COUNT]
void claim_system_worker()
#define ER_CSS_PTHREAD_COND_TIMEDOUT
Definition: error_code.h:1428
#define pthread_mutex_init(a, b)
Definition: area_alloc.c:48
EVENT_STAT event_stats
LF_TRAN_ENTRY * lf_tran_request_entry(LF_TRAN_SYSTEM *sys)
Definition: lock_free.c:271
const int LOG_SYSTEM_TRAN_INDEX
static int log_data_length
Definition: log_append.cpp:38
LF_TRAN_SYSTEM sessions_Ts
Definition: lock_free.c:50
#define pthread_mutex_unlock(a)
Definition: area_alloc.c:51
thread_id_t get_id()
unsigned long int thread_id_t
void thread_wakeup_already_had_mutex(cubthread::entry *thread_p, thread_resume_suspend_status resume_reason)
void push_resource_tracks(void)
static char * log_data_ptr
Definition: log_append.cpp:37
bool trace_slow_query
void thread_suspend_wakeup_and_unlock_entry(cubthread::entry *thread_p, thread_resume_suspend_status suspended_reason)
int fi_thread_final(THREAD_ENTRY *thread_p)
LF_TRAN_SYSTEM spage_saving_Ts
Definition: lock_free.c:46
thread_resume_suspend_status resume_status
thread_resume_suspend_status
pthread_mutex_t th_entry_lock
#define ER_CSS_PTHREAD_COND_WAIT
Definition: error_code.h:1008
struct log_zip * log_zip_undo
thread_type type
LF_TRAN_SYSTEM xcache_Ts
Definition: lock_free.c:54
void db_destroy_private_heap(THREAD_ENTRY *thread_p, HL_HEAPID heap_id)
Definition: memory_alloc.c:388
void request_lock_free_transactions(void)
LF_TRAN_SYSTEM obj_lock_ent_Ts
Definition: lock_free.c:48
struct drand48_data rand_buf
struct timeval latch_waits
#define assert(x)
clock::time_point time_point
Definition: perf_def.hpp:40
pthread_t get_posix_id()
thread_id_t m_id
HL_HEAPID db_create_private_heap(void)
Definition: memory_alloc.c:294
void lf_tran_return_entry(LF_TRAN_ENTRY *entry)
Definition: lock_free.c:310
pthread_mutex_t tran_index_lock
static LOG_ZIP * log_zip_undo
Definition: log_append.cpp:35
std::chrono::system_clock thread_clock_type
HL_HEAPID private_heap_id
Definition: memory_alloc.c:55
LF_TRAN_SYSTEM dwb_slots_Ts
Definition: lock_free.c:56
thread_type
void thread_check_suspend_reason_and_wakeup(cubthread::entry *thread_p, thread_resume_suspend_status resume_reason, thread_resume_suspend_status suspend_reason)
void clear_resources(void)
bool is_on_current_thread() const
#define THREAD_TS_COUNT
LF_TRAN_SYSTEM global_unique_stats_Ts
Definition: lock_free.c:52
#define NULL
Definition: freelistheap.h:34
adj_array * cnv_adj_buffer[3]
lockfree::tran::index get_lf_tran_index()
cubbase::alloc_tracker & m_alloc_tracker
if(extra_options)
Definition: dynamic_load.c:958
LF_TRAN_SYSTEM hfid_table_Ts
Definition: lock_free.c:53
#define ratio
Definition: mprec.h:356
struct log_zip * log_zip_redo
void thread_lock_entry(cubthread::entry *thread_p)
LF_TRAN_SYSTEM catalog_Ts
Definition: lock_free.c:49
void er_set_with_oserror(int severity, const char *file_name, const int line_no, int err_id, int num_args,...)
const char * PGBUF_TRACK_RES_NAME
#define ER_CSS_PTHREAD_COND_TIMEDWAIT
Definition: error_code.h:1009
const char * PGBUF_TRACK_NAME
resource_tracker< const void * > alloc_tracker
unsigned int rand_seed
#define NULL_TRAN_INDEX
static void error(const char *msg)
Definition: gencat.c:331
void thread_unlock_entry(cubthread::entry *thread_p)
const char * thread_resume_status_to_string(thread_resume_suspend_status resume_status)
static void thread_check_suspend_reason_and_wakeup_internal(cubthread::entry *thread_p, thread_resume_suspend_status resume_reason, thread_resume_suspend_status suspend_reason, bool had_mutex)
#define ARG_FILE_LINE
Definition: error_manager.h:44
lockfree::tran::index pull_lf_tran_index()
void log_zip_free(LOG_ZIP *log_zip)
Definition: log_compress.c:265
pthread_cond_t wakeup_cond
log_system_tdes * m_systdes
int thread_suspend_with_other_mutex(cubthread::entry *thread_p, pthread_mutex_t *mutex_p, int timeout, struct timespec *to, thread_resume_suspend_status suspended_reason)
static void thread_wakeup_internal(cubthread::entry *thread_p, thread_resume_suspend_status resume_reason, bool had_mutex)
int thread_suspend_timeout_wakeup_and_unlock_entry(cubthread::entry *thread_p, struct timespec *time_p, thread_resume_suspend_status suspended_reason)
void end_resource_tracks(void)
resource_tracker< const char * > pgbuf_tracker
HL_HEAPID private_heap_id
int i
Definition: dynamic_load.c:954
const char * ALLOC_TRACK_NAME
const unsigned PGBUF_TRACK_MAX_AMOUNT
cubbase::pgbuf_tracker & m_pgbuf_tracker
#define pthread_mutex_lock(a)
Definition: area_alloc.c:50
const char * thread_status_to_string(cubthread::entry::status status)
void thread_wakeup(cubthread::entry *thread_p, thread_resume_suspend_status resume_reason)
const std::size_t ALLOC_TRACK_MAX_ITEMS
void retire_system_worker()
const char * ALLOC_TRACK_RES_NAME
static const bool ENABLE_TRACKERS
struct timeval lock_waits
lockfree::tran::index m_lf_tran_index
int fi_thread_init(THREAD_ENTRY *thread_p)
cubsync::critical_section_tracker & m_csect_tracker
LF_TRAN_SYSTEM free_sort_list_Ts
Definition: lock_free.c:51
LF_TRAN_SYSTEM fpcache_Ts
Definition: lock_free.c:55
const char * thread_type_to_string(thread_type type)
#define pthread_mutex_destroy(a)
Definition: area_alloc.c:49
void adj_ar_free(ADJ_ARRAY *adj_array_p)
LF_TRAN_SYSTEM obj_lock_res_Ts
Definition: lock_free.c:47