Re: [Gc] [PATCH] Implement the basic atomic primitives for the tilegx/tilepro cpus.

Chris Metcalf <cmetcalf-VPRAkNaXOzVWk0Htik3J/[email protected]> Mon, 14 Nov 2016 16:44:52 -0500
Newsgroups gmane.comp.programming.garbage-collection.boehmgc
Message-ID <[email protected]>
Yes, it reports all 4 tests passed on tilegx as of the current git tip.

On 11/7/2016 5:34 AM, Ivan Maidanski wrote:
>
> Hello Chris,
>
> Does code in libatomic_ops master branch work?
>
> Regards,
> Ivan
>
> --
>
> Wed, 02 Nov 2016, 08:07 +03:00 from Helmut Grohne <[email protected]>:
>
> Hi Chris,
> On Thu, May 12, 2016 at 01:49:08AM +0300, Ivan Maidanski wrote:
> > I've committed these 2 patches (with small modifications) to master:
> > * https://github.com/ivmai/bdwgc/commit/1240658b92c0827ace6f9ac52b3425070eed948f
> > * https://github.com/ivmai/libatomic_ops/commit/04a286421802a503b58d804d0d673dd5a28c9e9b
> The version of libatomic_ops in Debian has finally been updated to 7.4.4
> and cherry-picks 04a86642180 (https://tracker.debian.org/news/808756).
> Of course, I went a head and tried to build it, but that fails
> (https://jenkins.debian.net/job/rebootstrap_tilegx_gcc6_supported/10/console):
> | make[3]: Entering directory '/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4/src'
> | /bin/bash ../libtool  --tag=CC   --mode=compile tilegx-linux-gnu-gcc -DHAVE_CONFIG_H   -I../src -I../src -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Wall -Wextra -g -O2 -fdebug-prefix-map=/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -c -o atomic_ops.lo atomic_ops.c
> | libtool: compile:  tilegx-linux-gnu-gcc -DHAVE_CONFIG_H -I../src -I../src -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Wall -Wextra -g -O2 -fdebug-prefix-map=/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -c atomic_ops.c -o atomic_ops.o
> | In file included from atomic_ops/sysdeps/gcc/tile.h:19:0,
> |                  from atomic_ops.h:295,
> |                  from atomic_ops.c:47:
> | atomic_ops/sysdeps/gcc/generic.h:65:13: error: unknown type name 'AO_TS_VAL_t'
> |    AO_INLINE AO_TS_VAL_t
> |              ^~~~~~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h:66:28: error: unknown type name 'AO_TS_t'
> |    AO_test_and_set(volatile AO_TS_t *addr)
> |                             ^~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h: In function 'AO_test_and_set':
> | atomic_ops/sysdeps/gcc/generic.h:68:13: error: 'AO_TS_VAL_t' undeclared (first use in this function)
> |      return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_RELAXED);
> |              ^~~~~~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h:68:13: note: each undeclared identifier is reported only once for each function it appears in
> | atomic_ops/sysdeps/gcc/generic.h:68:25: error: expected ';' before '__atomic_test_and_set'
> |      return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_RELAXED);
> |                          ^~~~~~~~~~~~~~~~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h:66:37: warning: unused parameter 'addr' [-Wunused-parameter]
> |    AO_test_and_set(volatile AO_TS_t *addr)
> |                                      ^~~~
> | atomic_ops/sysdeps/gcc/generic.h: At top level:
> | atomic_ops/sysdeps/gcc/generic.h:72:13: error: unknown type name 'AO_TS_VAL_t'
> |    AO_INLINE AO_TS_VAL_t
> |              ^~~~~~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h:73:36: error: unknown type name 'AO_TS_t'
> |    AO_test_and_set_acquire(volatile AO_TS_t *addr)
> |                                     ^~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h: In function 'AO_test_and_set_acquire':
> | atomic_ops/sysdeps/gcc/generic.h:75:13: error: 'AO_TS_VAL_t' undeclared (first use in this function)
> |      return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_ACQUIRE);
> |              ^~~~~~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h:75:25: error: expected ';' before '__atomic_test_and_set'
> |      return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_ACQUIRE);
> |                          ^~~~~~~~~~~~~~~~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h:73:45: warning: unused parameter 'addr' [-Wunused-parameter]
> |    AO_test_and_set_acquire(volatile AO_TS_t *addr)
> |                                              ^~~~
> | atomic_ops/sysdeps/gcc/generic.h: At top level:
> | atomic_ops/sysdeps/gcc/generic.h:79:13: error: unknown type name 'AO_TS_VAL_t'
> |    AO_INLINE AO_TS_VAL_t
> |              ^~~~~~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h:80:36: error: unknown type name 'AO_TS_t'
> |    AO_test_and_set_release(volatile AO_TS_t *addr)
> |                                     ^~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h: In function 'AO_test_and_set_release':
> | atomic_ops/sysdeps/gcc/generic.h:82:13: error: 'AO_TS_VAL_t' undeclared (first use in this function)
> |      return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_RELEASE);
> |              ^~~~~~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h:82:25: error: expected ';' before '__atomic_test_and_set'
> |      return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_RELEASE);
> |                          ^~~~~~~~~~~~~~~~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h:80:45: warning: unused parameter 'addr' [-Wunused-parameter]
> |    AO_test_and_set_release(volatile AO_TS_t *addr)
> |                                              ^~~~
> | atomic_ops/sysdeps/gcc/generic.h: At top level:
> | atomic_ops/sysdeps/gcc/generic.h:86:13: error: unknown type name 'AO_TS_VAL_t'
> |    AO_INLINE AO_TS_VAL_t
> |              ^~~~~~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h:87:33: error: unknown type name 'AO_TS_t'
> |    AO_test_and_set_full(volatile AO_TS_t *addr)
> |                                  ^~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h: In function 'AO_test_and_set_full':
> | atomic_ops/sysdeps/gcc/generic.h:89:13: error: 'AO_TS_VAL_t' undeclared (first use in this function)
> |      return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_SEQ_CST);
> |              ^~~~~~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h:89:25: error: expected ';' before '__atomic_test_and_set'
> |      return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_SEQ_CST);
> |                          ^~~~~~~~~~~~~~~~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h:87:42: warning: unused parameter 'addr' [-Wunused-parameter]
> |    AO_test_and_set_full(volatile AO_TS_t *addr)
> |                                           ^~~~
> | atomic_ops.c: At top level:
> | atomic_ops.c:97:1: error: unknown type name 'AO_TS_t'
> |  AO_TS_t AO_locks[AO_HASH_SIZE] = {
> |  ^~~~~~~
> | In file included from atomic_ops.c:47:0:
> | atomic_ops.h:160:33: error: 'AO_TS_CLEAR' undeclared here (not in a function)
> |  #define AO_TS_INITIALIZER (AO_t)AO_TS_CLEAR
> |                                  ^
> | atomic_ops.c:98:3: note: in expansion of macro 'AO_TS_INITIALIZER'
> |    AO_TS_INITIALIZER, AO_TS_INITIALIZER, AO_TS_INITIALIZER, AO_TS_INITIALIZER,
> |    ^~~~~~~~~~~~~~~~~
> | atomic_ops.c:106:31: error: unknown type name 'AO_TS_t'
> |  static void lock_ool(volatile AO_TS_t *l)
> |                                ^~~~~~~
> | atomic_ops.c: In function 'lock_ool':
> | atomic_ops.c:110:40: error: 'AO_TS_SET' undeclared (first use in this function)
> |    while (AO_test_and_set_acquire(l) == AO_TS_SET)
> |                                         ^~~~~~~~~
> | atomic_ops.c: At top level:
> | atomic_ops.c:114:30: error: unknown type name 'AO_TS_t'
> |  AO_INLINE void lock(volatile AO_TS_t *l)
> |                               ^~~~~~~
> | In file included from atomic_ops.c:47:0:
> | atomic_ops.c: In function 'lock':
> | atomic_ops.c:116:53: error: 'AO_TS_SET' undeclared (first use in this function)
> |    if (AO_EXPECT_FALSE(AO_test_and_set_acquire(l) == AO_TS_SET))
> |                                                      ^
> | atomic_ops.h:173:49: note: in definition of macro 'AO_EXPECT_FALSE'
> |  # define AO_EXPECT_FALSE(expr) __builtin_expect(expr, 0)
> |                                                  ^~~~
> | atomic_ops.c: At top level:
> | atomic_ops.c:120:32: error: unknown type name 'AO_TS_t'
> |  AO_INLINE void unlock(volatile AO_TS_t *l)
> |                                 ^~~~~~~
> | atomic_ops.c: In function 'unlock':
> | atomic_ops.c:122:3: warning: implicit declaration of function 'AO_CLEAR' [-Wimplicit-function-declaration]
> |    AO_CLEAR(l);
> |    ^~~~~~~~
> | atomic_ops.c: At top level:
> | atomic_ops.c:128:19: error: unknown type name 'AO_TS_t'
> |    static volatile AO_TS_t init_lock = AO_TS_INITIALIZER;
> |                    ^~~~~~~
> | atomic_ops.c: In function 'AO_fetch_compare_and_swap_emulation':
> | atomic_ops.c:154:3: error: unknown type name 'AO_TS_t'
> |    AO_TS_t *my_lock = AO_locks + AO_HASH(addr);
> |    ^~~~~~~
> | atomic_ops.c: In function 'AO_compare_double_and_swap_double_emulation':
> | atomic_ops.c:176:3: error: unknown type name 'AO_TS_t'
> |    AO_TS_t *my_lock = AO_locks + AO_HASH(addr);
> |    ^~~~~~~
> | atomic_ops.c: In function 'AO_store_full_emulation':
> | atomic_ops.c:201:3: error: unknown type name 'AO_TS_t'
> |    AO_TS_t *my_lock = AO_locks + AO_HASH(addr);
> |    ^~~~~~~
> | Makefile:603: recipe for target 'atomic_ops.lo' failed
> | make[3]: Leaving directory '/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4/src'
> | make[3]: *** [atomic_ops.lo] Error 1
> | Makefile:462: recipe for target 'all' failed
> | make[2]: Leaving directory '/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4/src'
> | Makefile:474: recipe for target 'all-recursive' failed
> | make[1]: Leaving directory '/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4'
> I'm not sure what went wrong here. Could you maybe look into it?
> Maybe tile.h needs to #include "../test_and_set_t_is_ao_t.h" before
> including "generic.h"?
> Other than this, the tilegx bootstrap in Debian is slowly progressing
> well. The toolchain appears to just work and it builds some 12 packages
> already. More to come after libatomic_ops.
> Helmut
> _______________________________________________
> bdwgc mailing list
> [email protected]
> https://lists.opendylan.org/mailman/listinfo/bdwgc
>

-- 
Chris Metcalf, Mellanox Technologies
http://www.mellanox.com