Remove profiler4j

It doesn't work anymore and there are other, non-invasive tools
available.
sip-call-params
Ingo Bauersachs 10 years ago
parent 6bc41324be
commit feee8eda79

@ -60,7 +60,6 @@
<classpathentry kind="lib" path="lib/installer-exclude/mac_widgets-0.9.5.jar"/>
<classpathentry kind="lib" path="lib/installer-exclude/objenesis-1.2.jar"/>
<classpathentry kind="lib" path="lib/installer-exclude/otr4j.jar"/>
<classpathentry kind="lib" path="lib/installer-exclude/profiler4j-1.0-beta3-SC.jar"/>
<classpathentry kind="lib" path="lib/installer-exclude/libphonenumber-5.9.jar"/>
<classpathentry kind="lib" path="lib/installer-exclude/sdes4j-1.1.3.jar"/>
<classpathentry kind="lib" path="lib/installer-exclude/smack.jar" sourcepath="lib/installer-exclude/smack-src.jar"/>

@ -206,10 +206,6 @@
<!-- set the os.lib.home here in case it was not set before -->
<property name="os.lib.home" value="${lib}"/>
<property name="profiler.args" value="" />
<property name="profiler.bootdelegation" value="" />
<property name="profiler.autostart" value="" />
<tstamp>
<format property="build.date" pattern="dd-MM-yyyy"/>
</tstamp>
@ -811,20 +807,14 @@
<!-- pass to SC args that have been specified by the user -->
<arg line="${args}"/>
<sysproperty key="org.osgi.framework.bootdelegation"
value="${profiler.bootdelegation}" />
<sysproperty key="felix.auto.start.68"
value="${profiler.autostart}" />
<jvmarg value="-Xdebug" />
<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5432" />
<!-- add some eventual profiler args, prevent server-class
<!-- prevent server-class
detection because -server uses much more memory for 32-bit OS
(64-bit always used -server) -->
<jvmarg line="${profiler.args} ${jvmarg.line}
-client ${jvm.maxheapsize}"/>
<jvmarg line="${jvmarg.line} -client ${jvm.maxheapsize}"/>
<sysproperty key="apple.laf.useScreenMenuBar" value="true" />
</java>
@ -918,93 +908,22 @@
<!-- pass to SC args that have been specified by the user -->
<arg line="${args}"/>
<sysproperty key="org.osgi.framework.bootdelegation"
value="${profiler.bootdelegation}" />
<sysproperty key="felix.auto.start.68"
value="${profiler.autostart}" />
<!-- add some eventual profiler args, prevent server-class
<!-- prevent server-class
detection because -server uses much more memory for 32-bit OS
(64-bit always used -server) -->
<jvmarg line="${profiler.args} ${jvmarg.line}
<jvmarg line="${jvmarg.line}
-client ${jvm.maxheapsize} ${jvmarg.splash} ${jvmarg.aegeturl}"/>
<sysproperty key="apple.laf.useScreenMenuBar" value="true" />
</java>
</target>
<!--RUN-JITSI-WITH-INTEGRATED-PROFILER -->
<target name="run-with-profiler"
description="Starts felix and runs sip-comunicator gui (use latest build) with the hooked classloader."
depends="bundle-plugin-profiler4j">
<antcall target="run">
<param name="profiler.args"
value="-Xmx128m -javaagent:${lib.noinst}/profiler4j-1.0-beta3-SC.jar" />
<param name="profiler.bootdelegation"
value="net.sf.profiler4j.agent.*" />
<param name="profiler.autostart"
value="reference:file:sc-bundles/profiler4j.jar" />
</antcall>
</target>
<target name="run-v4" description="Starts SC with a preference for IPv4.">
<ant target="run">
<property name="java.net.preferIPv6Addresses" value="false"/>
</ant>
</target>
<!--PROFILE-JITSI-IN-NETBEANS-IDE -->
<target name="profile" depends="bundle-plugin-profiler4j,deploy-os-specific-bundles"
description="Profile Project">
<fail unless="netbeans.home">
This target can only run inside the NetBeans IDE.
</fail>
<nbprofiledirect>
<classpath> <pathelement location="${dest}"/> </classpath>
</nbprofiledirect>
<java classname="net.java.sip.communicator.launcher.SIPCommunicator"
fork="true"
failonerror="true"
classpathref="project.class.path">
<jvmarg value="${profiler.info.jvmargs.agent}"/>
<!-- Tell felix to run Jitsi -->
<sysproperty key="felix.config.properties"
value="file:${lib}/felix.client.run.properties"/>
<!-- Tell java.util.logging about our logging preferences -->
<sysproperty key="java.util.logging.config.file"
value="${lib}/logging.properties"/>
<sysproperty key="java.net.preferIPv6Addresses"
value="false"/>
<sysproperty key="net.java.sip.communicator.SC_HOME_DIR_LOCATION"
value="${user.home}/schome"/>
<!-- Setting properties necessary for dependencies on native libs-->
<sysproperty key="java.library.path"
path="${ld.library.path}:${path}:${dyld.library.path}"/>
<!-- pass l10n properties from ant call for
easy translation debugging -->
<sysproperty key="user.language" value="${user.language}" />
<sysproperty key="user.country" value="${user.country}" />
<sysproperty key="user.variant" value="${user.variant}" />
<env key="LD_LIBRARY_PATH" path="${ld.library.path}"/>
<env key="PATH" path="${path}"/>
<env key="DYLD_LIBRARY_PATH" path="${dyld.library.path}"/>
</java>
<delete file="${bundles.dest}/profiler4j.jar"/>
</target>
<!-- we run this target before we run SC in order to copy os-specific
bundles from sc-bundles/osname to its parent sc-bundles-->
<target name="deploy-os-specific-bundles" if="bundles.dest.os">
@ -2185,21 +2104,6 @@ javax.swing.event, javax.swing.border"/>
</jar>
</target>
<!--BUNDLE-PLUGIN-PROFILER-->
<target name="bundle-plugin-profiler4j">
<jar compress="false" destfile="${bundles.dest}/profiler4j.jar"
manifest="${src}/net/java/sip/communicator/plugin/profiler4j/profiler4j.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/plugin/profiler4j"
prefix="net/java/sip/communicator/plugin/profiler4j" />
<zipfileset src="${lib.noinst}/profiler4j-1.0-beta3-SC.jar"
prefix=""/>
<zipfileset src="${lib.noinst}/jdom.jar" prefix=""/>
<zipfileset src="${lib.noinst}/jcommon-1.0.0.jar" prefix=""/>
<zipfileset src="${lib.noinst}/jfreechart-1.0.1.jar" prefix=""/>
<fileset file="${lib.noinst}/p4j-exclusions.txt"/>
</jar>
</target>
<!--BUNDLE-SimpleAccRegPlugin-->
<target name="bundle-plugin-simpleaccreg">
<jar compress="false" destfile="${bundles.dest}/simpleaccreg.jar"

Binary file not shown.

@ -1,26 +0,0 @@
#
# This file lists those classes that should be ignored by
# the agent during instrumentation. In most cases these
# classes trigger JVM internal errors and should be simply
# ignored. Notice that some classes are ignored even if
# not listed here (they may cause your JVM to crash
# seriously so I hard-coded exclusions for those within
# the agent)
#
# The agent will ignore all classes STARTING WITH the string
# indicated. So, you can exclude a whole package by ending
# with '.'
#
org.apache.tomcat.jni.OS
org.jboss.util.xml.DOMWriter
org.jboss.mq.il.uil2.ServerSocketManagerHandler
org.hsqldb.jdbc.jdbcConnection
org.hsqldb.Index
bsh.ParserTokenManager
org.eclipse.jdt.internal.compiler.lookup.TypeBinding
org.eclipse.jdt.internal.compiler.ast.Expression
org.eclipse.jdt.internal.compiler.problem.ProblemReporter
org.eclipse.jdt.internal.compiler.impl.Constant
com.arjuna.ats.internal.arjuna.objectstore.ShadowingStore
sun.reflect.

@ -1,78 +0,0 @@
/*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
* Copyright @ 2015 Atlassian Pty Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.java.sip.communicator.plugin.profiler4j;
import java.util.*;
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.util.*;
import org.osgi.framework.*;
/**
* Activates the profiler plug-in.
*
* @author Vladimir Skarupelov
*/
public class ProfilerActivator implements BundleActivator {
/**
* OSGi bundle context.
*/
public static BundleContext bundleContext;
Logger logger = Logger.getLogger(ProfilerActivator.class);
private ServiceRegistration menuRegistration = null;
public void start(BundleContext bc) throws Exception {
bundleContext = bc;
Hashtable<String, String> toolsMenuFilter =
new Hashtable<String, String>();
toolsMenuFilter.put(Container.CONTAINER_ID,
Container.CONTAINER_TOOLS_MENU.getID());
menuRegistration = bc.registerService(
PluginComponentFactory.class.getName(),
new PluginComponentFactory(Container.CONTAINER_TOOLS_MENU)
{
@Override
protected PluginComponent getPluginInstance()
{
return new SettingsWindowMenuEntry(
Container.CONTAINER_TOOLS_MENU, this);
}
},
toolsMenuFilter);
if (logger.isInfoEnabled())
logger.info("PROFILER4J [REGISTERED]");
}
public void stop(BundleContext bc) throws Exception {
if (menuRegistration != null)
{
menuRegistration.unregister();
if (logger.isInfoEnabled())
logger.info("PROFILER4J [UNREGISTERED]");
}
}
}

@ -1,58 +0,0 @@
/*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
* Copyright @ 2015 Atlassian Pty Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.java.sip.communicator.plugin.profiler4j;
import net.java.sip.communicator.service.resources.*;
import org.jitsi.service.resources.*;
/**
* The Messages class manages the access to the internationalization properties
* files.
*
* @author Vladimir Skarupelov;
*/
public class Resources
{
private static ResourceManagementService resourcesService = null;
/**
* Returns an internationalized string corresponding to the given key.
*
* @param key The key of the string.
* @return An internationalized string corresponding to the given key.
*/
public static String getString(String key)
{
return getResources().getI18NString(key);
}
/**
* Returns the <tt>ResourceManagementService</tt>.
*
* @return the <tt>ResourceManagementService</tt>.
*/
public static ResourceManagementService getResources()
{
if (resourcesService == null)
resourcesService =
ResourceManagementServiceUtils
.getService(ProfilerActivator.bundleContext);
return resourcesService;
}
}

@ -1,72 +0,0 @@
/*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
* Copyright @ 2015 Atlassian Pty Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.java.sip.communicator.plugin.profiler4j;
import java.awt.event.*;
import javax.swing.*;
import net.java.sip.communicator.service.gui.*;
import net.sf.profiler4j.console.*;
/**
* Menu entry for the profiler plug-in
*
* @author Vladimir Skarupelov
*/
public class SettingsWindowMenuEntry
extends AbstractPluginComponent
{
private static final String PROFILER_NAME = "plugin.profiler.PLUGIN_NAME";
private JMenuItem settingsMenuEntry;
public SettingsWindowMenuEntry(Container container,
PluginComponentFactory parentFactory)
{
super(container, parentFactory);
settingsMenuEntry = new JMenuItem(Resources.getString( PROFILER_NAME ));
settingsMenuEntry.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
Prefs prefs = new Prefs();
System.setProperty("swing.aatext",
String.valueOf(prefs.isAntialiasing()));
final Console app = new Console(prefs);
app.connect();
MainFrame f = new MainFrame(app);
app.setMainFrame(f);
f.pack();
f.setVisible(true);
}
});
}
public Object getComponent()
{
return settingsMenuEntry;
}
public String getName()
{
return Resources.getString( PROFILER_NAME );
}
}

@ -1,24 +0,0 @@
Bundle-Activator: net.java.sip.communicator.plugin.profiler4j.ProfilerActivator
Bundle-Name: Integrated profiler plugin
Bundle-Description: A bundle that provides profile cpu and memory of the running app.
Bundle-Vendor: jitsi.org
Bundle-Version: 0.0.1
Bundle-SymbolicName: net.java.sip.communicator.plugin.profiler4j
Import-Package: org.apache.commons.logging,
org.osgi.framework,
org.xml.sax,
org.xml.sax.ext,
org.xml.sax.helpers,
net.java.sip.communicator.service.contactlist,
net.java.sip.communicator.service.gui,
org.jitsi.service.resources, net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.protocol,
net.java.sip.communicator.util,
javax.swing,
javax.swing.border,
javax.swing.event,
javax.swing.filechooser,
javax.swing.table,
javax.swing.text,
javax.swing.tree,
javax.xml.parsers
Loading…
Cancel
Save