You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey Varlamov (JIRA)" <ji...@apache.org> on 2007/01/11 07:48:27 UTC
[jira] Assigned: (HARMONY-2815)
[classlib][security][drlvm][performance] very slow security checks with
quadratical dependence on number of stack frames
[ https://issues.apache.org/jira/browse/HARMONY-2815?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey Varlamov reassigned HARMONY-2815:
----------------------------------------
Assignee: Alexey Varlamov
> [classlib][security][drlvm][performance] very slow security checks with quadratical dependence on number of stack frames
> ------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2815
> URL: https://issues.apache.org/jira/browse/HARMONY-2815
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: any/ia32
> Reporter: Egor Pasko
> Assigned To: Alexey Varlamov
> Priority: Minor
>
> consider the following test:
> -----------------------------------------------------------------------
> import java.security.Security;
> public class SecurityPerfTest {
> public static void main(String[] args) {
> System.setSecurityManager(new SecurityManager());
> for (int i = 0; i < args.length; i++ ) {
> long start_time = System.currentTimeMillis();
> int amount = Integer.parseInt(args[i]);
> run(amount);
> long total_time = System.currentTimeMillis() - start_time;
> System.out.println(amount + " " + total_time);
> }
> }
> public static void run(int count) {
> if ( count < 0 ) {
> return;
> }
> //System.out.println("Runner: " + count);
> System.getProperty("os.name");
> run(count - 1);
> }
> }
> -----------------------------------------------------------------------
> where each recursive call of run() checks for security permissions
> to run it, issue the recursion depth list via command-line parameters like this:
> java SecurityPerfTest 50 100 150 300 350 400 450 500
> on Jrockit/ia32 the time spent for each step depends linearly on the number of
> iterations:
> 50 107 // this line should be ignored
> 100 1
> 150 1
> 300 3
> 350 5
> 400 6
> 450 7
> 500 9
> on Harmony (DRLVM) the dependency looks like quadratic:
> 50 114
> 100 647
> 150 1931
> 300 13798
> 350 21171
> 400 31116
> 450 43786
> 500 59547
> I suspect too many stack unwindings performed on this microbenchmark
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira