Re: STDCXX-1066 [was: Re: STDCXX forks]

2012-09-24 Thread Stefan Teleman
On Mon, Sep 24, 2012 at 8:21 AM, Liviu Nicoara nikko...@hates.ms wrote: In the light of your inability to answer the simplest questions about the correctness and usefulness of this patch, I propose we strike the patch in its entirety. Let me make something very clear to you: what I am doing

RE: STDCXX-1066 [was: Re: STDCXX forks]

2012-09-24 Thread Travis Vitek
Comments below... -Original Message- From: Stefan Teleman Sent: Monday, September 24, 2012 5:46 AM Subject: Re: STDCXX-1066 [was: Re: STDCXX forks] On Mon, Sep 24, 2012 at 8:21 AM, Liviu Nicoara nikko...@hates.ms wrote: In the light of your inability to answer the simplest

Re: STDCXX-1066 [was: Re: STDCXX forks]

2012-09-23 Thread Liviu Nicoara
On 09/16/12 12:03, Stefan Teleman wrote: On Sat, Sep 15, 2012 at 5:47 PM, Liviu Nicoara nikko...@hates.ms wrote: I merely wanted to point out that restoring the default packing is not the same as restoring the packing to the previous value in effect. Given this, I thought about an alternative

Re: STDCXX-1066 [was: Re: STDCXX forks]

2012-09-23 Thread Stefan Teleman
On Sun, Sep 23, 2012 at 3:26 PM, Liviu Nicoara nikko...@hates.ms wrote: To be honest it's quite bizarre that you cannot share that with us. Is it really a trade secret? How can that be the case if Oracle customers are also required to perform the same alignment, perhaps using the same

Re: STDCXX-1066 [was: Re: STDCXX forks]

2012-09-23 Thread Liviu Nicoara
On 9/23/12 3:48 PM, Stefan Teleman wrote: On Sun, Sep 23, 2012 at 3:26 PM, Liviu Nicoara nikko...@hates.ms wrote: To be honest it's quite bizarre that you cannot share that with us. Is it really a trade secret? How can that be the case if Oracle customers are also required to perform the same

Re: STDCXX-1066 [was: Re: STDCXX forks]

2012-09-23 Thread Stefan Teleman
On Sun, Sep 23, 2012 at 5:23 PM, Stefan Teleman stefan.tele...@gmail.com wrote: The second URL says this: QUOTE Due to a change in the implementation of the userland mutexes introduced by CR 6296770 in KU 137111-01, objects of type mutex_t and pthread_mutex_t must start at 8-byte aligned

Re: STDCXX-1066 [was: Re: STDCXX forks]

2012-09-23 Thread Liviu Nicoara
On 9/23/12 5:50 PM, Stefan Teleman wrote: On Sun, Sep 23, 2012 at 5:23 PM, Stefan Teleman stefan.tele...@gmail.com wrote: The second URL says this: QUOTE Due to a change in the implementation of the userland mutexes introduced by CR 6296770 in KU 137111-01, objects of type mutex_t and

Re: STDCXX-1066 [was: Re: STDCXX forks]

2012-09-23 Thread Stefan Teleman
On Sun, Sep 23, 2012 at 7:25 PM, Liviu Nicoara nikko...@hates.ms wrote: I am not asking for any other implementation and I am not looking to change anything. I wish you could explain it to us, but in the absence of trade secret details I will take an explanation for the questions above.

STDCXX-1056 DCII [was: Re: STDCXX-1056 [was: Re: STDCXX forks]]

2012-09-22 Thread Liviu Nicoara
On 9/17/12 5:42 PM, Liviu Nicoara wrote: [...] However, after more careful thought, I think there is a problem there even though we don't have an objective proof for it, yet. The writes are not atomic and they function just like DCII, being subject to both compiler reordering and out of order

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-18 Thread Stefan Teleman
On Mon, Sep 17, 2012 at 11:17 AM, Liviu Nicoara nikko...@hates.ms wrote: I hope you agree that this synchronization is sufficient for the facet initialization and reading of facet data. I have reduced the number of reported race conditions in 22.locale.numpunct.mt from 12440:

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-18 Thread Liviu Nicoara
On 09/18/12 08:55, Stefan Teleman wrote: On Mon, Sep 17, 2012 at 11:17 AM, Liviu Nicoara nikko...@hates.ms wrote: I hope you agree that this synchronization is sufficient for the facet initialization and reading of facet data. I have reduced the number of reported race conditions in

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-18 Thread Stefan Teleman
On Tue, Sep 18, 2012 at 12:43 PM, Liviu Nicoara nikko...@hates.ms wrote: I am attaching a test program which, while 100% MT-safe, is flagged by the Solaris thread analyzer. The program as written is not thread safe. It is reading the value of the counter variable and performing a zero

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-18 Thread Liviu Nicoara
On 09/18/12 13:21, Stefan Teleman wrote: On Tue, Sep 18, 2012 at 12:43 PM, Liviu Nicoara nikko...@hates.ms wrote: I am attaching a test program which, while 100% MT-safe, is flagged by the Solaris thread analyzer. The program as written is not thread safe. It is reading the value of the

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-18 Thread Stefan Teleman
On Tue, Sep 18, 2012 at 4:35 PM, Liviu Nicoara nikko...@hates.ms wrote: I will concede that I might be wrong and I am open to arguments. I would accept as a counter-argument this program if you can show a runtime failure. The the first read of the counter variable is outside a mutex lock

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-18 Thread Liviu Nicoara
On 09/18/12 18:24, Stefan Teleman wrote: On Tue, Sep 18, 2012 at 4:35 PM, Liviu Nicoara nikko...@hates.ms wrote: I will concede that I might be wrong and I am open to arguments. I would accept as a counter-argument this program if you can show a runtime failure. The the first read of the

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-18 Thread Liviu Nicoara
On 9/18/12 7:04 PM, Stefan Teleman wrote: On Tue, Sep 18, 2012 at 6:42 PM, Liviu Nicoara nikko...@hates.ms wrote: The first check is indeed an optimization. It is the point of this exercise to show that the unguarded reads in the localization library are not defects and the code, simplified in

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-18 Thread Stefan Teleman
On Tue, Sep 18, 2012 at 7:38 PM, Liviu Nicoara nikko...@hates.ms wrote: 1. The facet data caching is not MT-safe 2. The facet data initialization (STDCXX or system locales) is safe (*) 3. There is no unit test currently showing a failure in (2) 4. Timing results show that caching may be

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-17 Thread Stefan Teleman
On Mon, Sep 17, 2012 at 8:46 AM, Liviu Nicoara nikko...@hates.ms wrote: In the meantime I would like to stress again that __rw_get_numpunct is perfectly thread-safe and does not need extra locking for perfect forwarding. So, by removing the test for if (!(_C_flags _RW::__rw_gr))

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-17 Thread Liviu Nicoara
On 09/17/12 09:51, Stefan Teleman wrote: On Mon, Sep 17, 2012 at 8:46 AM, Liviu Nicoara nikko...@hates.ms wrote: In the meantime I would like to stress again that __rw_get_numpunct is perfectly thread-safe and does not need extra locking for perfect forwarding. So, by removing the test for

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-17 Thread Stefan Teleman
On Mon, Sep 17, 2012 at 11:17 AM, Liviu Nicoara nikko...@hates.ms wrote: I hope you agree that this synchronization is sufficient for the facet initialization and reading of facet data. Sorry, I do not agree. Two different thread analyzers from two different compilers written by two different

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-17 Thread Liviu Nicoara
On 09/17/12 11:21, Stefan Teleman wrote: On Mon, Sep 17, 2012 at 11:17 AM, Liviu Nicoara nikko...@hates.ms wrote: I hope you agree that this synchronization is sufficient for the facet initialization and reading of facet data. Sorry, I do not agree. Two different thread analyzers from two

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-17 Thread Wojciech Meyer
Liviu Nicoara nikko...@hates.ms writes: On 09/17/12 11:21, Stefan Teleman wrote: On Mon, Sep 17, 2012 at 11:17 AM, Liviu Nicoara nikko...@hates.ms wrote: I hope you agree that this synchronization is sufficient for the facet initialization and reading of facet data. Sorry, I do not agree.

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-17 Thread Stefan Teleman
On Mon, Sep 17, 2012 at 11:38 AM, Wojciech Meyer wojciech.me...@arm.com wrote: so which compilers do fail? You know, some of them might use the same component. Intel Compiler/Thread Analyzer on Linux, SunPro Compiler/Thread Analyzer on Linux and Solaris (Intel and SPARC). All three of them

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-16 Thread Stefan Teleman
On Sat, Sep 15, 2012 at 4:53 PM, Liviu Nicoara nikko...@hates.ms wrote: Now, to clear the confusion I created: the timing numbers I posted in the attachment stdcxx-1056-timings.tgz to STDCXX-1066 (09/11/2012) showed that a perfectly forwarding, no caching public interface (exemplified by a

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-16 Thread Liviu Nicoara
On 9/16/12 3:20 AM, Stefan Teleman wrote: On Sat, Sep 15, 2012 at 4:53 PM, Liviu Nicoara nikko...@hates.ms wrote: Now, to clear the confusion I created: the timing numbers I posted in the attachment stdcxx-1056-timings.tgz to STDCXX-1066 (09/11/2012) showed that a perfectly forwarding, no

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-16 Thread Liviu Nicoara
On 9/16/12 11:21 AM, Liviu Nicoara wrote: On 9/16/12 3:20 AM, Stefan Teleman wrote: On Sat, Sep 15, 2012 at 4:53 PM, Liviu Nicoara nikko...@hates.ms wrote: Now, to clear the confusion I created: the timing numbers I posted in the attachment stdcxx-1056-timings.tgz to STDCXX-1066 (09/11/2012)

STDCXX-1066 [was: Re: STDCXX forks]

2012-09-15 Thread Liviu Nicoara
On 9/1/12 1:52 PM, Stefan Teleman wrote: On Sat, Sep 1, 2012 at 12:15 PM, I opened yesterday STDCXX-1066: https://issues.apache.org/jira/browse/STDCXX-1056 about the pthread_mutex_t/pthread_cond_t alignment on SPARCV8. I'll have patches done this weekend. Achtung: the patchset is very

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-15 Thread Stefan Teleman
On Sat, Sep 15, 2012 at 9:01 AM, Liviu Nicoara nikko...@hates.ms wrote: That is funny. What compiler are you using? What does the following test case return for you? It's the Intel compiler with the patched stdcxx for the wrong case and GCC 4.7.1 + GNU libstdc++ for the correct case. GCC +

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-15 Thread Liviu Nicoara
On 9/15/12 1:51 PM, Stefan Teleman wrote: On Sat, Sep 15, 2012 at 9:01 AM, Liviu Nicoara nikko...@hates.ms wrote: That is funny. What compiler are you using? What does the following test case return for you? It's the Intel compiler with the patched stdcxx for the wrong case and GCC 4.7.1 +

Re: STDCXX-1066 [was: Re: STDCXX forks]

2012-09-15 Thread Liviu Nicoara
On 9/15/12 2:57 PM, Stefan Teleman wrote: On Sat, Sep 15, 2012 at 1:02 PM, Liviu Nicoara nikko...@hates.ms wrote: I have read through the patches attached to the incident, then I briefly read about the SunPro pragma align and pack. Two questions: 1. AFAICT, the use of the packing pragma may

Re: STDCXX-1066 [was: Re: STDCXX forks]

2012-09-15 Thread Liviu Nicoara
On 9/15/12 5:19 PM, Stefan Teleman wrote: On Sat, Sep 15, 2012 at 4:57 PM, Liviu Nicoara nikko...@hates.ms wrote: Yes, but it restores the default packing, not an arbitrary one, potentially set by the user prior to including our headers. Say, the user sets 2, the default is 4 and we set 8.

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-12 Thread Liviu Nicoara
On 09/12/12 00:21, Stefan Teleman wrote: On Tue, Sep 11, 2012 at 10:18 PM, Liviu Nicoara nikko...@hates.ms wrote: AFAICT, there are two cases to consider: 1. Using STDCXX locale database initializes the __rw_punct_t data in the first, properly synchronized pass through __rw_get_numpunct. All

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-11 Thread Liviu Nicoara
On 9/11/12 9:40 PM, Martin Sebor wrote: On 09/11/2012 04:15 PM, Stefan Teleman wrote: On Mon, Sep 10, 2012 at 4:24 PM, Stefan Teleman I think I have something which doesn't break BC - stay tuned because I'm testing it now. OK. So, here's a possible implementation of __rw_get_numpunct() with

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-11 Thread Stefan Teleman
On Tue, Sep 11, 2012 at 10:18 PM, Liviu Nicoara nikko...@hates.ms wrote: AFAICT, there are two cases to consider: 1. Using STDCXX locale database initializes the __rw_punct_t data in the first, properly synchronized pass through __rw_get_numpunct. All subsequent calls use the __rw_punct_t

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-10 Thread Stefan Teleman
On Thu, Sep 6, 2012 at 6:43 PM, Stefan Teleman stefan.tele...@gmail.com wrote: On Thu, Sep 6, 2012 at 4:02 PM, Martin Sebor mse...@gmail.com wrote: Here's a thought: it's not pretty but how about having the function initialize the facet? It already has a pointer to the base class, so it could

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-10 Thread Martin Sebor
On 09/10/2012 10:56 AM, Stefan Teleman wrote: On Thu, Sep 6, 2012 at 6:43 PM, Stefan Telemanstefan.tele...@gmail.com wrote: On Thu, Sep 6, 2012 at 4:02 PM, Martin Sebormse...@gmail.com wrote: Here's a thought: it's not pretty but how about having the function initialize the facet? It

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-10 Thread Stefan Teleman
On Mon, Sep 10, 2012 at 2:21 PM, Liviu Nicoara nikko...@hates.ms wrote: 4. Without caching of grouping values, grouping() delegates always to do_grouping(): real0m5.668s user1m11.389s sys 0m3.952s FWIW, 22.2.3.1.1 explicitly states that all of the decimal_point(), grouping(),

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-10 Thread Liviu Nicoara
On 09/10/12 15:01, Stefan Teleman wrote: On Mon, Sep 10, 2012 at 2:21 PM, Liviu Nicoara nikko...@hates.ms wrote: 4. Without caching of grouping values, grouping() delegates always to do_grouping(): real0m5.668s user1m11.389s sys 0m3.952s FWIW, 22.2.3.1.1 explicitly states that

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-10 Thread Stefan Teleman
On Mon, Sep 10, 2012 at 1:32 PM, Martin Sebor mse...@gmail.com wrote: That said, I'd certainly prefer to avoid hacks as much as possible. This problem could perhaps more cleanly be solved by having the facet pass a reference to the string (or to all of its internal data) to modify to the

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-07 Thread Liviu Nicoara
On 09/06/12 19:54, Martin Sebor wrote: I'm not sure how easily we can do that. Almost all of locale is initialized lazily. Some of the layers might depend on the facets being initialized lazily as well. This was a deliberate design choice. One of the constraints was to avoid dynamic

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-07 Thread Liviu Nicoara
On 09/06/12 22:58, Stefan Teleman wrote: On Thu, Sep 6, 2012 at 7:31 PM, Liviu Nicoara nikko...@hates.ms wrote: There would be a performance degradation. IMHO, it would be minor and would simplify the code considerably. After finally being able to reproduce the defect with SunPro 12.3 on

dbx [was: Re: STDCXX-1056 [was: Re: STDCXX forks]]

2012-09-07 Thread Liviu Nicoara
On 09/07/12 11:58, Stefan Teleman wrote: On Fri, Sep 7, 2012 at 8:52 AM, Liviu Nicoara nikko...@hates.ms wrote: On 09/06/12 19:54, Martin Sebor wrote: Also, does the 27.objects test pass with this patch? No, it does not. It hangs at the first insertion, line 227. Unfortunately, I cannot

Re: dbx [was: Re: STDCXX-1056 [was: Re: STDCXX forks]]

2012-09-07 Thread Stefan Teleman
On Fri, Sep 7, 2012 at 12:23 PM, Liviu Nicoara nikko...@hates.ms wrote: I get this when launching the debugger: $ dbx -xexec32 t For information about new features see `help changes' To remove this message, put `dbxenv suppress_startup_message 7.9' in your .dbxrc Reading t Reading

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-06 Thread Liviu Nicoara
On 09/05/12 23:51, Martin Sebor wrote: On 09/05/2012 09:03 PM, Stefan Teleman wrote: [...] Agreed. But: if the choice is between an implementation which [1] breaks ABI and [2] performs 20% worse -- even in contrived test cases -- than another implementation [2] which doesn't break ABI, and

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-06 Thread Stefan Teleman
On Thu, Sep 6, 2012 at 9:16 AM, Liviu Nicoara nikko...@hates.ms wrote: I think Stefan is referring to adding a mutex member variable to the facet in question and breaking binary compatibility. If that is the case I have confused things when I suggested exactly that, earlier. A cursory read

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-06 Thread Martin Sebor
On 09/06/2012 09:58 AM, Stefan Teleman wrote: On Thu, Sep 6, 2012 at 9:16 AM, Liviu Nicoaranikko...@hates.ms wrote: I think Stefan is referring to adding a mutex member variable to the facet in question and breaking binary compatibility. If that is the case I have confused things when I

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-06 Thread Stefan Teleman
On Thu, Sep 6, 2012 at 2:46 PM, Stefan Teleman stefan.tele...@gmail.com wrote: [steleman@darthvader][/src/steleman/programming/stdcxx-ss122/stdcxx-4.2.1/build/tests][09/06/2012 14:40:11][1084] ./22.locale.numpunct.mt --nthreads=2 --nloops=100 # INFO (S1) (10 lines): # TEXT: # COMPILER:

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-06 Thread Liviu Nicoara
On Sep 5, 2012, at 4:03 PM, Martin Sebor wrote: On 09/05/2012 01:33 PM, Liviu Nicoara wrote: On 09/05/12 15:17, Martin Sebor wrote: On 09/05/2012 12:40 PM, Liviu Nicoara wrote: On 09/05/12 14:09, Stefan Teleman wrote: On Wed, Sep 5, 2012 at 10:52 AM, Martin Sebor mse...@gmail.com wrote:

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-06 Thread Martin Sebor
I'm not sure how easily we can do that. Almost all of locale is initialized lazily. Some of the layers might depend on the facets being initialized lazily as well. This was a deliberate design choice. One of the constraints was to avoid dynamic initialization or allocation at startup. [...]

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-06 Thread Stefan Teleman
On Thu, Sep 6, 2012 at 7:31 PM, Liviu Nicoara nikko...@hates.ms wrote: There would be a performance degradation. IMHO, it would be minor and would simplify the code considerably. After finally being able to reproduce the defect with SunPro 12.3 on x86_64 I tried to remove the lazy

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-05 Thread Liviu Nicoara
On 09/05/12 00:51, Stefan Teleman wrote: On Tue, Sep 4, 2012 at 10:49 PM, Martin Sebor mse...@gmail.com wrote: template class _CharT inline string numpunct_CharT::grouping () const { if (!(_C_flags _RW::__rw_gr)) { numpunct* const __self = _RWSTD_CONST_CAST

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-05 Thread Martin Sebor
That's what I wanted to do originally - use a per-object mutext. Unfortunately the _C_mutex member in rw::__rw_synchronized is static: That's the wrong __rw_synchronized -- this one is for non-MT builds. The one we get in MT builds in on line 370. struct __rw_synchronized { // static so

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-05 Thread Stefan Teleman
On Wed, Sep 5, 2012 at 10:52 AM, Martin Sebor mse...@gmail.com wrote: You're right that there is a race here. But the race is benign because the T2 will assign the same value to the string as T1 did (because the grouping must be the same in the same locale). This doesn't reallocate the string

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-05 Thread Liviu Nicoara
On 09/05/12 14:09, Stefan Teleman wrote: On Wed, Sep 5, 2012 at 10:52 AM, Martin Sebor mse...@gmail.com wrote: [...] OK so I did a little bit of testing, after looking at the *right* __rw_guard class. :-) I changed the std::numpunct class thusly: [...] And then: template class _CharT inline

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-05 Thread Martin Sebor
On 09/05/2012 12:40 PM, Liviu Nicoara wrote: On 09/05/12 14:09, Stefan Teleman wrote: On Wed, Sep 5, 2012 at 10:52 AM, Martin Sebor mse...@gmail.com wrote: [...] OK so I did a little bit of testing, after looking at the *right* __rw_guard class. :-) I changed the std::numpunct class thusly:

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-05 Thread Martin Sebor
On 09/05/2012 01:33 PM, Liviu Nicoara wrote: On 09/05/12 15:17, Martin Sebor wrote: On 09/05/2012 12:40 PM, Liviu Nicoara wrote: On 09/05/12 14:09, Stefan Teleman wrote: On Wed, Sep 5, 2012 at 10:52 AM, Martin Sebor mse...@gmail.com wrote: [...] OK so I did a little bit of testing, after

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-05 Thread Pavel Heimlich, a.k.a. hajma
2012/9/5 Stefan Teleman stefan.tele...@gmail.com: On Tue, Sep 4, 2012 at 9:15 PM, Liviu Nicoara nikko...@hates.ms wrote: That is good, right? Yes, it is good. :-) Could not get an Intel build off the ground on the account of the LIMITS.cpp test not running to completion because of a

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-05 Thread Stefan Teleman
On Wed, Sep 5, 2012 at 4:20 PM, Stefan Teleman stefan.tele...@gmail.com wrote: But then there's another aspect -- which I probably failed to highlight in my previous email: the per-object mutex implementation is 20% *slower* than the class-static mutex implementation. class-static

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-05 Thread Stefan Teleman
On Wed, Sep 5, 2012 at 10:55 PM, Martin Sebor mse...@gmail.com wrote: I suspect the difference is due to the overhead of the repeated initialization and destruction of the per-object mutex in the test. The test repeatedly creates (and discards) named locale objects. The per-class mutex is

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-05 Thread Martin Sebor
On 09/05/2012 09:03 PM, Stefan Teleman wrote: On Wed, Sep 5, 2012 at 10:55 PM, Martin Sebor mse...@gmail.com wrote: I suspect the difference is due to the overhead of the repeated initialization and destruction of the per-object mutex in the test. The test repeatedly creates (and discards)

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-05 Thread Martin Sebor
Incidentally, a benchmark that I would expect to be more representative of real programs than the test we've been using is one that creates a small number of named locales up front and then uses each in a loop in each thread (as opposed to creating and destroying it in each iteration and thread).

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-04 Thread Liviu Nicoara
On Sep 4, 2012, at 10:34 AM, Stefan Teleman wrote: On Tue, Sep 4, 2012 at 7:35 AM, Liviu Nicoara nikko...@hates.ms wrote: By no means I am dismissing it. It is at the very least an issue of efficiency. I will try an Intel C++ build on x86_64 at some point today. What build type was that? I

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-04 Thread Martin Sebor
I recall discussing this when you opened the defect but I'm not sure what the outcome of the discussion was. I looked at the code some more just now and I agree with you that (at least the numpunct) facet isn't thread safe. The premise was that we didn't need any locking because the facet never

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-04 Thread Stefan Teleman
On Tue, Sep 4, 2012 at 10:49 PM, Martin Sebor mse...@gmail.com wrote: template class _CharT inline string numpunct_CharT::grouping () const { if (!(_C_flags _RW::__rw_gr)) { numpunct* const __self = _RWSTD_CONST_CAST (numpunct*, this); _RWSTD_MT_GUARD

Re: STDCXX-1056 [was: Re: STDCXX forks]

2012-09-03 Thread Stefan Teleman
On Mon, Sep 3, 2012 at 11:57 PM, Stefan Teleman stefan.tele...@gmail.com wrote: On Mon, Sep 3, 2012 at 3:19 PM, Liviu Nicoara nikko...@hates.ms wrote: I tried, unsuccessfully, to reproduce the failure observed by Martin in 22.locale.moneypunct.mt, in both debug and optimized, wide and narrow

Re: STDCXX forks

2012-09-01 Thread Liviu Nicoara
On 08/31/12 12:20, Stefan Teleman wrote: On Fri, Aug 31, 2012 at 8:40 AM, Liviu Nicoara nikko...@hates.ms wrote: Stefan's seem like a complete git-ification of the whole Apache repository but with no changes I could detect. Not quite. :-) [...] The official Oracle port for Solaris 10 and 11,

Re: STDCXX forks

2012-09-01 Thread Liviu Nicoara
On 08/31/12 08:58, C. Bergström wrote: On 08/31/12 07:40 PM, Liviu Nicoara wrote: Please correct me if I am wrong. I have seen two forks on github, one belonging to C. Bergstrom/Pathscale and the other to Stefan Teleman. The first one contains a number of genuine code changes outside the

Re: STDCXX forks

2012-09-01 Thread Stefan Teleman
On Sat, Sep 1, 2012 at 12:15 PM, Liviu Nicoara nikko...@hates.ms wrote: Hi Stefan, I have went through the patches. Specifically, I have spent more time looking in the mutex alignment changes and the C++ C library headers patches, and I only read the others. In order: The test extensions

Re: STDCXX forks

2012-09-01 Thread Liviu Nicoara
On Sep 1, 2012, at 1:52 PM, Stefan Teleman wrote: On Sat, Sep 1, 2012 at 12:15 PM, Liviu Nicoara nikko...@hates.ms wrote: [...] This pretty much sums up my first impression. [...] To begin with: the compiler flags/GNUmakefile changes are very specific to the SunPro compilers and to our

Re: STDCXX forks

2012-08-31 Thread C. Bergström
On 08/31/12 07:40 PM, Liviu Nicoara wrote: Please correct me if I am wrong. I have seen two forks on github, one belonging to C. Bergstrom/Pathscale and the other to Stefan Teleman. The first one contains a number of genuine code changes outside the Apache repository, but without canonical

Re: STDCXX forks

2012-08-31 Thread Liviu Nicoara
On 08/31/12 08:58, C. Bergström wrote: On 08/31/12 07:40 PM, Liviu Nicoara wrote: Please correct me if I am wrong. I have seen two forks on github, one belonging to C. Bergstrom/Pathscale and the other to Stefan Teleman. The first one contains a number of genuine code changes outside the

Re: STDCXX forks

2012-08-31 Thread C. Bergström
On 08/31/12 08:10 PM, Liviu Nicoara wrote: NetBSD also has a fork I believe, but not sure if it's public/status Do you know where that is? He just posted his bulk patch http://www.netbsd.org/~joerg/stdcxx.diff There's a small amount of CVS noise and we already have one part on our

Re: STDCXX forks

2012-08-31 Thread Stefan Teleman
On Fri, Aug 31, 2012 at 8:40 AM, Liviu Nicoara nikko...@hates.ms wrote: Stefan's seem like a complete git-ification of the whole Apache repository but with no changes I could detect. Not quite. :-) You are - most likely referring to the svn repo at CVSDude here:

Re: STDCXX forks

2012-08-31 Thread Jim Jagielski
On Aug 31, 2012, at 8:40 AM, Liviu Nicoara nikko...@hates.ms wrote: Stefan's seem like a complete git-ification of the whole Apache repository but with no changes I could detect. FWIW, The ASF supports git so if people think it would help, all we'd need to do is ask #infra to move stdcxx

Re: STDCXX forks

2012-08-31 Thread Stefan Teleman
On Fri, Aug 31, 2012 at 8:58 AM, C. Bergström cbergst...@pathscale.com wrote: He has quite a number of patches and forget where those are kept. I'm guessing a lot of his fixes target KDE/Qt apps and the Perennial C++VS testsuite. http://www.peren.com/pages/cppvs_set.htm Correction: my