aboutsummaryrefslogtreecommitdiffstats
path: root/lib/jinterface
AgeCommit message (Collapse)Author
2013-08-05Add smoke testsLukas Larsson
Smoke tests are meant to verify that a build of erlang has been successfull.
2013-04-22[jinterface] Extend timetrap timers in nc_SUITE and jinterface_SUITESiri Hansen
2013-04-22[jinterface] Set max heap size for jvm when running echo_serverSiri Hansen
The test cases nc_SUITE:decompress_roundtrip and nc_SUITE:compress_roundtrip fails on some machines with OutOfMemoryException. This commit sets the max heap size for the jvm to 256M in nc_SUITE in order to get around this.
2013-04-22[jinterface] Clean up hanging java nodes after each test caseSiri Hansen
2013-03-05[jinterface] Kill process between tests to avoid consequential errorSiri Hansen
In some cases when a test case fails, the erl_link_server process (which is spawned by many test cases in jinterface_SUITE) does not terminate. This causes the next test case to fail with a badarg as it tries to register a new process with the same name. To avoid this, erl_link_server, if it exists, is now killed in end_per_testcase. Also, some compiler warnings are removed from jitu.erl.
2013-03-04[jinterface] Make tests handle space in path on windowsSiri Hansen
Add quotes around classpath on windows.
2013-02-25Prepare releaseOTP_R16BErlang/OTP
2013-02-22Update copyright yearsBjörn-Egil Dahlberg
2013-02-13Merge branch 'nk/jinterface_dont_compress_if_size_increased/OTP-10822'Fredrik Gustafsson
* nk/jinterface_dont_compress_if_size_increased/OTP-10822: jinterface, OtpOutputStream: add a write_compressed(object, level) method jinterface: fix a memory leak jinterface: new limited OutputStream implementation without the need to resize jinterface: don't return compressed external term if bigger than uncompressed jinterface: don't compress small erlang terms < 5 bytes jinterface, OtpOutputStream: properly override the three write() methods to ensure our growth strategy jinterface: fix typo in error message if encoding fails jinterface: don't need another FilterOutputStream wrapper
2013-02-12Merge branch 'vd/jinterface_windows_cookie/OTP-10821'Fredrik Gustafsson
* vd/jinterface_windows_cookie/OTP-10821: jinterface: fix finding cookie file on windows
2013-02-11Bumped version numberFredrik Gustafsson
2013-02-04jinterface, OtpOutputStream: add a write_compressed(object, level) methodNico Kruber
Now that we use an own deflater, we can also allow the user to specify the compression level as in Erlang's term_to_binary/2.
2013-02-04jinterface: fix a memory leakNico Kruber
after the first try to compress the value with a fixed buffer size, the deflater must be closed so that memory can be (instantly) reused
2013-02-04jinterface: new limited OutputStream implementation without the need to resizeNico Kruber
(saves memory re-allocations)
2013-02-04jinterface: don't return compressed external term if bigger than uncompressedNico Kruber
Now, OtpOutputStream#write_compressed() uses the same mechanism as erts_term_to_binary() in external.c: it tries to compress the given term into a buffer of the size of the uncompressed term and if this is not possible, i.e. the compression plus headers is bigger, it uses the uncompressed external term format instead.
2013-02-04jinterface: don't compress small erlang terms < 5 bytesNico Kruber
Compression always has at least 5 bytes (the compressed tag + original size) so we can't get a smaller external term if the original term is already smaller than 5 bytes.
2013-02-04jinterface, OtpOutputStream: properly override the three write() methods to ↵Nico Kruber
ensure our growth strategy Previously, if code called e.g. write(byte[] b, int off, int len), the growth strategy of the parent class ByteArrayOutputStream was used.
2013-02-04jinterface: fix typo in error message if encoding failsNico Kruber
2013-02-04jinterface: don't need another FilterOutputStream wrapperNico Kruber
DeflaterOutputStream is already an FilterOutputStream
2013-02-01jinterface: fix finding cookie file on windowsVlad Dumitrescu
Jinterface uses System.getProperty("user.home") to locate the user's home and the cookie file. On Windows, the result might be different than the value used by Erlang, which looks first to the HOMEDRIVE and HOMEPATH variables. The fix makes jinterface use the same logic.
2013-02-01fix bug in OtpErlangTuple constructorVlad Dumitrescu
The elems field would remain unitialized if the count parameter is zero in constructor
2013-01-29Prepare releaseOTP_R16A_RELEASE_CANDIDATEErlang/OTP
2013-01-25Update copyright yearsBjörn-Egil Dahlberg
2013-01-23Merge branch 'sverk/r16/utf8-atoms'Sverker Eriksson
* sverk/r16/utf8-atoms: erl_interface: Fix bug when transcoding atoms from and to UTF8 erl_interface: Changed erlang_char_encoding interface erts: Testcase doing unicode atom printout with ~w erl_interface: even more utf8 atom stuff erts: Fix bug in analyze_utf8 causing faulty latin1 detection Add UTF-8 node name support for epmd workaround... Fix merge conflict with hasse UTF-8 atom documentation test case erl_interface: utf8 atoms continued Add utf8 atom distribution test cases atom fixes for NIFs and atom_to_binary UTF-8 support for distribution Implement UTF-8 atom support for jinterface erl_interface: Enable decode of unicode atoms stdlib: Fix printing of unicode atoms erts: Change internal representation of atoms to utf8 erts: Refactor rename DFLAG(S)_INTERNAL_TAGS for conformity Conflicts: erts/emulator/beam/io.c OTP-10753
2013-01-18Merge branch 'nox/enable-silent-rules/OTP-10726'Björn-Egil Dahlberg
* nox/enable-silent-rules/OTP-10726: Implement ./otp_build configure --enable-silent-rules
2013-01-16Implement UTF-8 atom support for jinterfaceRickard Green
2013-01-15Implement ./otp_build configure --enable-silent-rulesAnthony Ramine
With silent rules, the output of make is less verbose and compilation warnings are easier to spot. Silent rules are disabled by default and can be disabled or enabled at will by make V=0 and make V=1.
2013-01-09Prepare OTP files for Unicode as default encodingHans Bolinder
2012-11-23Merge branch 'maint'Björn-Egil Dahlberg
2012-11-23Update copyright yearsBjörn-Egil Dahlberg
2012-11-14Merge branch 'vd/jinterface_epmd_localhost'Henrik Nord
* vd/jinterface_epmd_localhost: OtpEpmd.lokupNames() may hang if network is badly configured OTP-10579
2012-10-18Merge branch 'nk/jinterface-fix_compressed_binary'Henrik Nord
* nk/jinterface-fix_compressed_binary: add (de)compress roundtrip tests with larger values fix reading compressed binary terms from Java OTP-10505
2012-10-01OtpEpmd.lokupNames() may hang if network is badly configuredVlad Dumitrescu
On some machines with weird network configurations, InetAddress.getLocalHost() hangs. Searching for "localhost" works (at least in the cases I met). The difference is that the loopback address will be returned, instead of the real IP address, but for the local machine this should not be a problem.
2012-09-05add (de)compress roundtrip tests with larger valuesNico Kruber
2012-09-03Escape whitespace in pathLukas Larsson
2012-08-31Update copyright yearsBjörn-Egil Dahlberg
2012-06-13fix reading compressed binary terms from JavaNico Kruber
Larger compressed binary could not be decoded inside JInterface. - applied a patch posted on erlang-questins in September 2009 http://erlang.org/pipermail/erlang-patches/2009-September/000478.html -> extended this patch as it alone was not enough to fix the bug Problem was that when reading from an InputStream, you can only specify a maximum number of bytes to read. Java doesn't quarantee that it actually reads this many bytes - it could be less! This patch now reads up until the expected size bytes. If there are more than expected, the actual number of available bytes is not printed (we probably shouldn't read the additional bytes, security-wise - the erlang external byte representation is broken in this case though).
2012-06-05Update to work with whitespace in exec pathLukas Larsson
OTP-10106 OTP-10107
2012-04-01Prepare releaseOTP_R15B01Erlang/OTP
2012-03-30Update copyright yearsBjörn-Egil Dahlberg
2012-02-16Merge branch 'vd/jinterface-atom-message' into maintHenrik Nord
* vd/jinterface-atom-message: Improve error message when creating a too long OtpErlangAtom OTP-9928
2012-02-16Merge branch 'vd/java-string-bug' into maintHenrik Nord
* vd/java-string-bug: add test for Java string bug workaround for Java bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6242664 OTP-9927
2012-02-16Merge branch 'rc/spell-registered' into maintHenrik Nord
* rc/spell-registered: Correct spelling of "registered" in various places in the source code OTP-9925
2012-01-03Fix some broken links in documentationLukas Larsson
2012-01-03Correct spelling of "registered" in various places in the source codeRichard Carlsson
2011-12-12Prepare releaseErlang/OTP
2011-12-09Update copyright yearsBjörn-Egil Dahlberg
2011-12-09restore Java5 compatibilityNico Kruber
2011-12-09JInterface: improve OtpOutputStream buffer allocationNico Kruber
Previously, the buffer was increased linearly by 2048 bytes. I now propose to use an exponential increase function (similar to Javas ArrayList, e.g. always at least +50%). This significantly increases performance of e.g. doRPC for large parameters as the following comparison illustrates (shown is the buffer size after each time, the buffer has reached its limit): n n*2048 (n*3)/2+1 (n*3)/2+1 (at least +2048) 1 2,048 2,048 2,048 2 4,096 3,073 4,096 3 6,144 4,610 6,145 4 8,192 6,916 9,218 5 10,240 10,375 13,828 6 12,288 15,563 20,743 7 14,336 23,345 31,115 8 16,384 35,018 46,673 9 18,432 52,528 70,010 10 20,480 78,793 105,016 11 22,528 118,190 157,525 12 24,576 177,286 236,288 13 26,624 265,930 354,433 14 28,672 398,896 531,650 15 30,720 598,345 797,476 16 32,768 897,518 1,196,215 17 34,816 1,346,278 1,794,323 18 36,864 2,019,418 2,691,485 19 38,912 3,029,128 4,037,228 20 40,960 4,543,693 6,055,843 21 43,008 6,815,540 9,083,765 22 45,056 10,223,311 13,625,648 23 47,104 15,334,967 20,438,473 24 49,152 23,002,451 30,657,710 25 51,200 34,503,677 45,986,566 26 53,248 51,755,516 68,979,850 27 55,296 77,633,275 103,469,776 28 57,344 116,449,913 155,204,665 29 59,392 174,674,870 232,806,998 30 61,440 262,012,306 349,210,498 Actually, ArrayList uses the (n*3)/2+1 strategy. In order not to decrease performance for messages <10k, we could keep the (public) OtpOutputStream#defaultIncrement constant and let the buffer always increase by at least this much (third column). In order to create a buffer of 1MB, now only 16 array copies are needed vs. (1024*1024/2048)=512 array copies for the linear increase function. If a user sends a message of 10MB size, this is 22 vs. 5120 copies. NOTE: the meaning of the "public static final int defaultIncrement" member has changed a bit with this implementation (API compatibility?) - why was this public in the first place?
2011-11-24add test for Java string bugVlad Dumitrescu