Closed Bug 758871 Opened 13 years ago Closed 13 years ago

Thread names passed to PR_SetThreadName should be smartly reduced to 16 chars length

Categories

(NSPR :: NSPR, defect)

All
Linux
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 758837

People

(Reporter: mayhemer, Assigned: mayhemer)

References

Details

I've discovered that the name cannot be set for a debugger on some linux platforms when it's longer then 16 bytes (chars). Since we suffix some names with a " #N" numbering in Gecko when threads are part of a pool, we should preserve the number and not just truncate it as the current implementation does. Now, the names are more or less shorter then 16 chars. But we may find useful or necessary to allow it in the future. My suggestion is, also for simplicity, to take some first 7 and last 7 chars of the name joined with ".." in the middle, when the name doesn't fit 16 chars. This should be made on the NSPR level in ptthread.c!PR_SetThreadName.
Honza: I suggest we close this bug and just do this work in bug 758837, unless we can't get this done before NSPR 4.9.2 is released.
Target Milestone: --- → 4.9.2
Wan-Teh: The patch for this should be simple. As I understand, you want to create patch for this your self?
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
Honza: no, I wasn't planning to write a patch for this. Could you write a patch? Thanks.
Then I'd rather do it in this bug.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Status: REOPENED → ASSIGNED
Bug 758837 is still open and NSPR 4.9.2 hasn't been released. This work is really part of bug 758837.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.