harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre Queinnec <pierre.quein...@zenika.com>
Subject [drlvm][thread] stacksize
Date Thu, 21 Apr 2011 20:13:56 GMT
Hi guys,

I'm seeing some strange thread stack size behavior while porting to Mac, and I've been trying
to compare to a build on a 64bit linux (Debian 6).

Here's what I see on Linux, whatever I can define for my Xss, the stack size in init_psd_structure
always calculates 8M :

==========================================================================
queinnec@squeezy:~/Code/harmony-svn-java6/target/hdk/jdk$ ./bin/java -Xmx1024m -Xss12m -version
init_psd_structure: stack_size = 8388608
init_psd_structure: guard_size = 4096
init_psd_structure: mem_protect_size = 1024
PMQ - setup_stack - (&res - mem_protect_size) = 140736255271036
PMQ - setup_stack - (guard_page_addr + guard_page_size = 140736246960128
PMQ - setup_stack - (&res - mem_protect_size) = 140715543796204
PMQ - setup_stack - (guard_page_addr + guard_page_size = 140715541778432
PMQ - setup_stack - (&res - mem_protect_size) = 140715528108524
PMQ - setup_stack - (guard_page_addr + guard_page_size = 140715515604992
PMQ - setup_stack - (&res - mem_protect_size) = 140715515521516
PMQ - setup_stack - (guard_page_addr + guard_page_size = 140715513503744
PMQ - setup_stack - (&res - mem_protect_size) = 140715513420268
PMQ - setup_stack - (guard_page_addr + guard_page_size = 140715511402496
Apache Harmony Launcher : (c) Copyright 1991, 2010 The Apache Software Foundation or its licensors,
as applicable.
java version "1.5.0"
Apache Harmony (1.5.0)
DRLVM (1.5.0-r1092753)
pre-alpha : not complete or compatible
svn = r1092753, (Apr 15 2011), Linux/em64t/gcc 4.4.5, release build
http://harmony.apache.org
==========================================================================

(patch attached, maybe I just missed something obvious... I've seen some maybe related JIRA
but they were supposed to be closed)

As a second question, in drlvm/vm/port/src/thread/linux/thread_os.c there's this test :

     if ((size_t)(&res) - PSD->mem_protect_size
             < (size_t)tlsdata->guard_page_addr + tlsdata->guard_page_size)
         return EINVAL;

I'm not sure I get this... Anyone care to explain?

As a side note, the port seems to start fine but crashes after starting some threads.
Cheers,
-- Pierre Queinnec




Mime
View raw message