Skip to content

Commit da7387d

Browse files
committed
Give up on using JIP to profile and pass --profile argument through to JRuby for new instrumented profiler.
1 parent 21d585f commit da7387d

File tree

5 files changed

+11
-15
lines changed

5 files changed

+11
-15
lines changed

Rakefile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
require 'spec/rake/spectask'
21
require 'rake/gempackagetask'
32
require 'date'
43

5-
Spec::Rake::SpecTask.new
6-
7-
task :default => :spec
4+
begin
5+
require 'spec/rake/spectask'
6+
Spec::Rake::SpecTask.new
7+
task :default => :spec
8+
rescue LoadError
9+
task :default do
10+
puts "rspec 1.3.0 or higher is not installed; skipping jruby-launcher specs"
11+
end
12+
end
813

914
file './lib/jruby-launcher.rb' => 'version.h' do |t|
1015
version = nil

argnames.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#define ARG_NAME_SAMPLE "--sample"
2828
#define ARG_NAME_MANAGE "--manage"
2929
#define ARG_NAME_HEADLESS "--headless"
30-
#define ARG_NAME_PROFILE "--profile"
3130
#define ARG_NAME_NG_SERVER "--ng-server"
3231
#define ARG_NAME_NG "--ng"
3332

argparser.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -293,14 +293,6 @@ bool ArgParser::parseArgs(int argc, char *argv[]) {
293293
javaOptions.push_back("-Djruby.management.enabled=true");
294294
} else if (it->compare(ARG_NAME_HEADLESS) == 0) {
295295
javaOptions.push_back("-Djava.awt.headless=true");
296-
} else if (it->compare(ARG_NAME_PROFILE) == 0 ||
297-
it->compare(ARG_NAME_PROFILE "-all") == 0) {
298-
std::string filterType = it->length() == strlen(ARG_NAME_PROFILE) ? "ruby" : "all";
299-
javaOptions.push_front("-Dprofile.properties=" + platformDir + "/lib/profile-" + filterType + ".properties");
300-
javaOptions.push_front("-javaagent:" + platformDir + "/lib/profile.jar");
301-
progArgs.push_back("-X+C");
302-
noBootClassPath = true;
303-
printToConsole("Running with instrumented profiler\n");
304296
} else if (it->compare(ARG_NAME_NG) == 0) {
305297
nailgunClient = true;
306298
} else if (it->compare(ARG_NAME_NG_SERVER) == 0) {

lib/jruby-launcher.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module JRubyLauncher
2-
VERSION = "1.0.1"
2+
VERSION = "1.0.2"
33
end

spec/launcher_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129

130130
# JRUBY-4611
131131
it "stops argument processing on first non-option argument" do
132-
jruby_launcher_args("foo.rb --profile")[-2..-1].should == ["foo.rb", "--profile"]
132+
jruby_launcher_args("foo.rb --sample")[-2..-1].should == ["foo.rb", "--sample"]
133133
end
134134

135135
# JRUBY-4608

0 commit comments

Comments
 (0)