Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-1327

thread id representation

    • Type: Icon: Task Task
    • Resolution: Done
    • WT2.4.1
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      While I know pthread_self() returns an opaque type and we do our best to print that out in verbose messages, it would be good if we could represent it in the same way gdb shows it. On MacOS it is a struct I believe and gdb doesn't try to show anything. And in our verbose messages, what we display is simply enough to distinguish one from another. On Linux it appears to be an address and that is what gdb is showing.

      For example, here are 4 thread ids extracted from verbose messages:

      0027406a177f0000
      0037c06a177f0000
      0047406b177f0000
      00f7ff63177f0000
      

      And here are the seven threads running that generated the messages, from info threads in gdb:

      (gdb) info thread
        Id   Target Id         Frame 
        7    Thread 0x7f176c406700 (LWP 28025)
        6    Thread 0x7f176bc05700 (LWP 28026)
        5    Thread 0x7f176b404700 (LWP 28027)
        4    Thread 0x7f1763fff700 (LWP 28028)
        3    Thread 0x7f176ac03700 (LWP 28029)
        2    Thread 0x7f176a402700 (LWP 28030)
      * 1    Thread 0x7f176e87b740 (LWP 28019)
      

      With this small number, if I squint hard, I can sort of tie them together. Does anyone know what gdb uses to know whether or not it can display it? Can we somehow determine if it can be displayed and do some ifdef'ing to display it?

            Assignee:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Reporter:
            sue.loverso@mongodb.com Susan LoVerso
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: