Experimental Physics and Industrial Control System
|
Awesome, thanks Michael. I may have a way to test this. Will be looking at this after looking at our instrumentation/tracing tools and stubbing out the time calls. Let me get back to you later this week.
On Mon, Mar 11, 2019, 11:32 PM Michael Davidsaver via Tech-talk < [email protected]> wrote: Hi Casey,
On 3/8/19 4:18 PM, Layne (US), William C via Tech-talk wrote:
> am trying to narrow down which futex we are spending lots of time in
This got me thinking about how this would be done. Looking at glibc
I think the first argument of the futex() syscall is the __data.__lock
member of pthread_mutex_t.
https://github.com/bminor/glibc/blob/43b1048ab9418e902aac8c834a7a9a88c501620a/nptl/pthread_mutex_lock.c#L43
If I change epicsMutexOsdShow() in posix/osdThread.c to:
> void epicsMutexOsdShow(struct epicsMutexOSD * pmutex, unsigned int level)
> {
> #if defined(__linux__) && defined(__GLIBC__)
> /* GLIBC w/ NTPL is passing the &__lock as the first argument (UADDR)
> * of the futex() syscall.
> */
> printf(" pthread uaddr=%p\n", &pmutex->lock.__data.__lock);
> #endif
> }
and apply
https://github.com/epics-base/epics-base/commit/d1149a0ba90096b3aa2890029ed9a430216d96ec
then I think the uaddr value shown below can be matched to futex() calls.
(I couldn't find a quick way to check this)
> epics> epicsMutexShowAll 0 1
> ellCount(&mutexList) 56 ellCount(&freeList) 0
> epicsMutexId 0x55db1e6f90e0 source ..//iocsh/iocsh.cpp line 78
> pthread uaddr=0x55db1e6f90a0
> ...
- References:
- generalTime/epicsTimeGetCurrent and casr questions Layne (US), William C via Tech-talk
- Re: generalTime/epicsTimeGetCurrent and casr questions Michael Davidsaver via Tech-talk
- Navigate by Date:
- Prev:
Re: I'm looking for a pvacces example to read PVStructure Heinz Junkes via Tech-talk
- Next:
ADPIcam driver question Jörn Dreyer via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
<2019>
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: generalTime/epicsTimeGetCurrent and casr questions Michael Davidsaver via Tech-talk
- Next:
EPICS June 2019: Abstract Submission is open Ralph Lange via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
<2019>
2020
2021
2022
2023
2024
|
ANJ, 12 Mar 2019 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|