* Re: [lttng-ust][PATCH V2] Add config time check for new gettid API
[not found] <20190726190223.38027-1-raj.khem@gmail.com>
@ 2019-07-26 19:23 ` Sebastien Boisvert
[not found] ` <8c60fd3c-398e-98ef-796b-028bf1fb5647@gydle.com>
1 sibling, 0 replies; 6+ messages in thread
From: Sebastien Boisvert @ 2019-07-26 19:23 UTC (permalink / raw)
To: Khem Raj, lttng-dev
On 2019-07-26 3:02 p.m., Khem Raj wrote:
> glibc 2.30 introduced this function see [1]
> so it's best to detect it
> and provide fallback only if its not present
nit:
-if its not present
+if it's not present
I cloned the git repository of the glibc, but I could not find
the definition of gettid().
Do you know where it is located in glibc ?
Thanks.
>
> [1] https://sourceware.org/bugzilla/show_bug.cgi?id=6399
>
> Upstream-Status: Submitted [https://lists.lttng.org/pipermail/lttng-dev/2019-July/029131.html]
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> v2: Fix typos in commit message
>
> configure.ac | 1 +
> include/lttng/ust-tid.h | 7 +++++--
> 2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 7fa059a..b1099c1 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -137,6 +137,7 @@ AC_CHECK_FUNCS([ \
> clock_gettime \
> ftruncate \
> getpagesize \
> + gettid \
> gettimeofday \
> localeconv \
> memchr \
> diff --git a/include/lttng/ust-tid.h b/include/lttng/ust-tid.h
> index e669d7e..7995c78 100644
> --- a/include/lttng/ust-tid.h
> +++ b/include/lttng/ust-tid.h
> @@ -26,7 +26,10 @@
> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> * SOFTWARE.
> */
> -
> +#include <config.h>
> +#if HAVE_GETTID
> +#include <unistd.h>
> +#else
> #ifdef __linux__
> #include <syscall.h>
> #endif
> @@ -49,5 +52,5 @@ static inline pid_t gettid(void)
> return getpid();
> }
> #endif
> -
> +#endif /* HAVE_GETTID */
> #endif /* _LTTNG_UST_TID_H */
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [lttng-ust][PATCH V2] Add config time check for new gettid API
[not found] ` <8c60fd3c-398e-98ef-796b-028bf1fb5647@gydle.com>
@ 2019-07-26 20:55 ` Khem Raj
[not found] ` <CAMKF1sqVkKeEYMn1sPWgKfqFuaEnk68Hd4MfccUJKW4UkT0L=Q@mail.gmail.com>
1 sibling, 0 replies; 6+ messages in thread
From: Khem Raj @ 2019-07-26 20:55 UTC (permalink / raw)
To: Sebastien Boisvert; +Cc: lttng-dev
On Fri, Jul 26, 2019 at 12:23 PM Sebastien Boisvert <sboisvert@gydle.com> wrote:
>
>
>
> On 2019-07-26 3:02 p.m., Khem Raj wrote:
> > glibc 2.30 introduced this function see [1]
> > so it's best to detect it
> > and provide fallback only if its not present
>
> nit:
>
> -if its not present
> +if it's not present
>
I sent a v3 with this fixed.
> I cloned the git repository of the glibc, but I could not find
> the definition of gettid().
>
> Do you know where it is located in glibc ?
>
see
https://sourceware.org/git/?p=glibc.git;a=commit;h=1d0fc213824eaa2a8f8c4385daaa698ee8fb7c92
> Thanks.
>
> >
> > [1] https://sourceware.org/bugzilla/show_bug.cgi?id=6399
> >
> > Upstream-Status: Submitted [https://lists.lttng.org/pipermail/lttng-dev/2019-July/029131.html]
> >
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > ---
> > v2: Fix typos in commit message
> >
> > configure.ac | 1 +
> > include/lttng/ust-tid.h | 7 +++++--
> > 2 files changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/configure.ac b/configure.ac
> > index 7fa059a..b1099c1 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -137,6 +137,7 @@ AC_CHECK_FUNCS([ \
> > clock_gettime \
> > ftruncate \
> > getpagesize \
> > + gettid \
> > gettimeofday \
> > localeconv \
> > memchr \
> > diff --git a/include/lttng/ust-tid.h b/include/lttng/ust-tid.h
> > index e669d7e..7995c78 100644
> > --- a/include/lttng/ust-tid.h
> > +++ b/include/lttng/ust-tid.h
> > @@ -26,7 +26,10 @@
> > * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> > * SOFTWARE.
> > */
> > -
> > +#include <config.h>
> > +#if HAVE_GETTID
> > +#include <unistd.h>
> > +#else
> > #ifdef __linux__
> > #include <syscall.h>
> > #endif
> > @@ -49,5 +52,5 @@ static inline pid_t gettid(void)
> > return getpid();
> > }
> > #endif
> > -
> > +#endif /* HAVE_GETTID */
> > #endif /* _LTTNG_UST_TID_H */
> >
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [lttng-ust][PATCH V2] Add config time check for new gettid API
[not found] ` <CAMKF1sqVkKeEYMn1sPWgKfqFuaEnk68Hd4MfccUJKW4UkT0L=Q@mail.gmail.com>
@ 2019-07-26 21:09 ` Sebastien Boisvert
[not found] ` <dd43d88d-15e5-cafe-b2a5-c2be84ac361d@gydle.com>
1 sibling, 0 replies; 6+ messages in thread
From: Sebastien Boisvert @ 2019-07-26 21:09 UTC (permalink / raw)
To: Khem Raj; +Cc: lttng-dev
On 2019-07-26 4:55 p.m., Khem Raj wrote:
> On Fri, Jul 26, 2019 at 12:23 PM Sebastien Boisvert <sboisvert@gydle.com> wrote:
>>
>>
>>
>> On 2019-07-26 3:02 p.m., Khem Raj wrote:
>>> glibc 2.30 introduced this function see [1]
>>> so it's best to detect it
>>> and provide fallback only if its not present
>>
>> nit:
>>
>> -if its not present
>> +if it's not present
>>
>
> I sent a v3 with this fixed.
>
>> I cloned the git repository of the glibc, but I could not find
>> the definition of gettid().
>>
>> Do you know where it is located in glibc ?
>>
> see
> https://sourceware.org/git/?p=glibc.git;a=commit;h=1d0fc213824eaa2a8f8c4385daaa698ee8fb7c92
>
In the commit diff at https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=1d0fc213824eaa2a8f8c4385daaa698ee8fb7c92;hp=f289e656ec8221756519a601042bc9fbe1b310fb
I don't see the definition of gettid().
I see the declaration.
There are a bunch of *ABI changes (*.abilist), and test changes (*tst-*).
>> Thanks.
>>
>>>
>>> [1] https://sourceware.org/bugzilla/show_bug.cgi?id=6399
>>>
>>> Upstream-Status: Submitted [https://lists.lttng.org/pipermail/lttng-dev/2019-July/029131.html]
>>>
>>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>>> ---
>>> v2: Fix typos in commit message
>>>
>>> configure.ac | 1 +
>>> include/lttng/ust-tid.h | 7 +++++--
>>> 2 files changed, 6 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/configure.ac b/configure.ac
>>> index 7fa059a..b1099c1 100644
>>> --- a/configure.ac
>>> +++ b/configure.ac
>>> @@ -137,6 +137,7 @@ AC_CHECK_FUNCS([ \
>>> clock_gettime \
>>> ftruncate \
>>> getpagesize \
>>> + gettid \
>>> gettimeofday \
>>> localeconv \
>>> memchr \
>>> diff --git a/include/lttng/ust-tid.h b/include/lttng/ust-tid.h
>>> index e669d7e..7995c78 100644
>>> --- a/include/lttng/ust-tid.h
>>> +++ b/include/lttng/ust-tid.h
>>> @@ -26,7 +26,10 @@
>>> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
>>> * SOFTWARE.
>>> */
>>> -
>>> +#include <config.h>
>>> +#if HAVE_GETTID
>>> +#include <unistd.h>
>>> +#else
>>> #ifdef __linux__
>>> #include <syscall.h>
>>> #endif
>>> @@ -49,5 +52,5 @@ static inline pid_t gettid(void)
>>> return getpid();
>>> }
>>> #endif
>>> -
>>> +#endif /* HAVE_GETTID */
>>> #endif /* _LTTNG_UST_TID_H */
>>>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [lttng-ust][PATCH V2] Add config time check for new gettid API
[not found] ` <dd43d88d-15e5-cafe-b2a5-c2be84ac361d@gydle.com>
@ 2019-07-26 21:27 ` Khem Raj
[not found] ` <CAMKF1so6z7dk7GkpVLR9bp72c2AD47+j9Cd9xOw=fw8+EG7oQg@mail.gmail.com>
1 sibling, 0 replies; 6+ messages in thread
From: Khem Raj @ 2019-07-26 21:27 UTC (permalink / raw)
To: Sebastien Boisvert; +Cc: lttng-dev
On Fri, Jul 26, 2019 at 2:09 PM Sebastien Boisvert <sboisvert@gydle.com> wrote:
>
>
>
> On 2019-07-26 4:55 p.m., Khem Raj wrote:
> > On Fri, Jul 26, 2019 at 12:23 PM Sebastien Boisvert <sboisvert@gydle.com> wrote:
> >>
> >>
> >>
> >> On 2019-07-26 3:02 p.m., Khem Raj wrote:
> >>> glibc 2.30 introduced this function see [1]
> >>> so it's best to detect it
> >>> and provide fallback only if its not present
> >>
> >> nit:
> >>
> >> -if its not present
> >> +if it's not present
> >>
> >
> > I sent a v3 with this fixed.
> >
> >> I cloned the git repository of the glibc, but I could not find
> >> the definition of gettid().
> >>
> >> Do you know where it is located in glibc ?
> >>
> > see
> > https://sourceware.org/git/?p=glibc.git;a=commit;h=1d0fc213824eaa2a8f8c4385daaa698ee8fb7c92
> >
>
> In the commit diff at https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=1d0fc213824eaa2a8f8c4385daaa698ee8fb7c92;hp=f289e656ec8221756519a601042bc9fbe1b310fb
> I don't see the definition of gettid().
>
> I see the declaration.
>
> There are a bunch of *ABI changes (*.abilist), and test changes (*tst-*).
>
its a syscall wrapper which is generated during build from
sysdeps/unix/sysv/linux/syscalls.list
>
> >> Thanks.
> >>
> >>>
> >>> [1] https://sourceware.org/bugzilla/show_bug.cgi?id=6399
> >>>
> >>> Upstream-Status: Submitted [https://lists.lttng.org/pipermail/lttng-dev/2019-July/029131.html]
> >>>
> >>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> >>> ---
> >>> v2: Fix typos in commit message
> >>>
> >>> configure.ac | 1 +
> >>> include/lttng/ust-tid.h | 7 +++++--
> >>> 2 files changed, 6 insertions(+), 2 deletions(-)
> >>>
> >>> diff --git a/configure.ac b/configure.ac
> >>> index 7fa059a..b1099c1 100644
> >>> --- a/configure.ac
> >>> +++ b/configure.ac
> >>> @@ -137,6 +137,7 @@ AC_CHECK_FUNCS([ \
> >>> clock_gettime \
> >>> ftruncate \
> >>> getpagesize \
> >>> + gettid \
> >>> gettimeofday \
> >>> localeconv \
> >>> memchr \
> >>> diff --git a/include/lttng/ust-tid.h b/include/lttng/ust-tid.h
> >>> index e669d7e..7995c78 100644
> >>> --- a/include/lttng/ust-tid.h
> >>> +++ b/include/lttng/ust-tid.h
> >>> @@ -26,7 +26,10 @@
> >>> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> >>> * SOFTWARE.
> >>> */
> >>> -
> >>> +#include <config.h>
> >>> +#if HAVE_GETTID
> >>> +#include <unistd.h>
> >>> +#else
> >>> #ifdef __linux__
> >>> #include <syscall.h>
> >>> #endif
> >>> @@ -49,5 +52,5 @@ static inline pid_t gettid(void)
> >>> return getpid();
> >>> }
> >>> #endif
> >>> -
> >>> +#endif /* HAVE_GETTID */
> >>> #endif /* _LTTNG_UST_TID_H */
> >>>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [lttng-ust][PATCH V2] Add config time check for new gettid API
[not found] ` <CAMKF1so6z7dk7GkpVLR9bp72c2AD47+j9Cd9xOw=fw8+EG7oQg@mail.gmail.com>
@ 2019-07-29 13:48 ` Sebastien Boisvert
0 siblings, 0 replies; 6+ messages in thread
From: Sebastien Boisvert @ 2019-07-29 13:48 UTC (permalink / raw)
To: Khem Raj; +Cc: lttng-dev
On 2019-07-26 5:27 p.m., Khem Raj wrote:
>>
>> I don't see the definition of gettid().
>
> its a syscall wrapper which is generated during build from
> sysdeps/unix/sysv/linux/syscalls.list
>
OK, now I understand, thanks !
^ permalink raw reply [flat|nested] 6+ messages in thread
* [lttng-ust][PATCH V2] Add config time check for new gettid API
@ 2019-07-26 19:02 Khem Raj
0 siblings, 0 replies; 6+ messages in thread
From: Khem Raj @ 2019-07-26 19:02 UTC (permalink / raw)
To: lttng-dev
glibc 2.30 introduced this function see [1]
so it's best to detect it
and provide fallback only if its not present
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=6399
Upstream-Status: Submitted [https://lists.lttng.org/pipermail/lttng-dev/2019-July/029131.html]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
v2: Fix typos in commit message
configure.ac | 1 +
include/lttng/ust-tid.h | 7 +++++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 7fa059a..b1099c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -137,6 +137,7 @@ AC_CHECK_FUNCS([ \
clock_gettime \
ftruncate \
getpagesize \
+ gettid \
gettimeofday \
localeconv \
memchr \
diff --git a/include/lttng/ust-tid.h b/include/lttng/ust-tid.h
index e669d7e..7995c78 100644
--- a/include/lttng/ust-tid.h
+++ b/include/lttng/ust-tid.h
@@ -26,7 +26,10 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-
+#include <config.h>
+#if HAVE_GETTID
+#include <unistd.h>
+#else
#ifdef __linux__
#include <syscall.h>
#endif
@@ -49,5 +52,5 @@ static inline pid_t gettid(void)
return getpid();
}
#endif
-
+#endif /* HAVE_GETTID */
#endif /* _LTTNG_UST_TID_H */
--
2.22.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-07-29 13:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20190726190223.38027-1-raj.khem@gmail.com>
2019-07-26 19:23 ` [lttng-ust][PATCH V2] Add config time check for new gettid API Sebastien Boisvert
[not found] ` <8c60fd3c-398e-98ef-796b-028bf1fb5647@gydle.com>
2019-07-26 20:55 ` Khem Raj
[not found] ` <CAMKF1sqVkKeEYMn1sPWgKfqFuaEnk68Hd4MfccUJKW4UkT0L=Q@mail.gmail.com>
2019-07-26 21:09 ` Sebastien Boisvert
[not found] ` <dd43d88d-15e5-cafe-b2a5-c2be84ac361d@gydle.com>
2019-07-26 21:27 ` Khem Raj
[not found] ` <CAMKF1so6z7dk7GkpVLR9bp72c2AD47+j9Cd9xOw=fw8+EG7oQg@mail.gmail.com>
2019-07-29 13:48 ` Sebastien Boisvert
2019-07-26 19:02 Khem Raj
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.