[#48729] [ANN] ruby 2.0.0-preview1 released — Yusuke Endoh <mame@...>
Japanese later; 日本語はあとで
Hi,
Hello Vit,
2012/11/6 Yusuke Endoh <mame@tsg.ne.jp>
[#48745] [ruby-trunk - Bug #7267][Open] Dir.glob on Mac OS X returns unexpected string encodings for unicode file names — "kennygrant (Kenny Grant)" <kennygrant@...>
[#48773] [ruby-trunk - Bug #7269][Open] Refinement doesn't work if using locate after method — "ko1 (Koichi Sasada)" <redmine@...>
(2012/11/03 10:11), headius (Charles Nutter) wrote:
(2012/11/03 10:36), SASADA Koichi wrote:
[#48774] [ruby-trunk - Feature #4085] Refinements and nested methods — "shugo (Shugo Maeda)" <redmine@...>
[#48819] [ruby-trunk - Feature #4085] Refinements and nested methods — "headius (Charles Nutter)" <headius@...>
[#48820] [ruby-trunk - Bug #7271][Assigned] Refinement doesn't seem lexical — "ko1 (Koichi Sasada)" <redmine@...>
[#48847] [ruby-trunk - Bug #7274][Open] UnboundMethods should be bindable to any object that is_a?(owner of the UnboundMethod) — "rits (First Last)" <redmine@...>
[#48882] [ruby-trunk - Feature #4085] Refinements and nested methods — "headius (Charles Nutter)" <headius@...>
[#48964] [Backport93 - Backport #7285][Assigned] some failures on RubyInstaller CI — "usa (Usaku NAKAMURA)" <usa@...>
[#48988] [ruby-trunk - Feature #7292][Open] Enumerable#to_h — "marcandre (Marc-Andre Lafortune)" <ruby-core@...>
[#48997] [ruby-trunk - Feature #7297][Open] map_to alias for each_with_object — "nathan.f77 (Nathan Broadbent)" <nathan.f77@...>
[#49018] [ruby-trunk - Feature #7299][Open] Ruby should not completely ignore blocks. — "marcandre (Marc-Andre Lafortune)" <ruby-core@...>
[#49078] Re: [ruby-cvs:44714] marcandre:r37544 (ruby_1_9_3): merge revisions r33453, r37542: — "U.Nakamura" <usa@...>
Hello,
[#49119] ID_ALLOCATOR ? — Roger Pack <rogerdpack2@...>
Hello.
Can I see ruby-prof code?
On Fri, Nov 9, 2012 at 11:14 AM, SASADA Koichi <ko1@atdot.net> wrote:
[#49196] [ruby-trunk - Feature #7322][Open] Add a new operator name #>< for bit-wise "exclusive or" — "alexeymuranov (Alexey Muranov)" <redmine@...>
[#49211] [ruby-trunk - Feature #7328][Open] Move ** operator precedence under unary + and - — "boris_stitnicky (Boris Stitnicky)" <boris@...>
[#49256] [ruby-trunk - Feature #7336][Open] Flexiable OPerator Precedence — "trans (Thomas Sawyer)" <transfire@...>
[#49267] [ruby-trunk - Feature #7340][Open] 'each_with' or 'into' alias for 'each_with_object' — "nathan.f77 (Nathan Broadbent)" <nathan.f77@...>
[#49268] [ruby-trunk - Feature #7341][Open] Enumerable#associate — "nathan.f77 (Nathan Broadbent)" <nathan.f77@...>
[#49282] Re: [ruby-cvs:44801] tenderlove:r37631 (trunk): * probes.d: add DTrace probe declarations. — "U.Nakamura" <usa@...>
Hello,
Hello,
2012/11/13 U.Nakamura <usa@garbagecollect.jp>:
[#49298] [ruby-trunk - Feature #7346][Open] object(...) as syntax sugar for object.call(...) — "rosenfeld (Rodrigo Rosenfeld Rosas)" <rr.rosas@...>
[#49320] [ruby-trunk - Feature #4085] Refinements and nested methods — "headius (Charles Nutter)" <headius@...>
[#49328] [ruby-trunk - Bug #7349][Open] Struct#inspect needs more meaningful output — "postmodern (Hal Brodigan)" <postmodern.mod3@...>
[#49340] bugs.ruby-lang.org - 500 error — Luis Lavena <luislavena@...>
Hello,
I've been unable to access it since morning EET (about 6 hours now).
It's almost 3am in Japan now, don't forget.
On Wed, Nov 14, 2012 at 2:46 PM, Zachary Scott <zachary@zacharyscott.net> wrote:
[#49354] review open pull requests on github — Zachary Scott <zachary@...>
Could we get a review on any open pull requests on github before the
2012/11/15 Zachary Scott <zachary@zacharyscott.net>:
Ok, I was hoping one of the maintainers might want to.
I could add my eyes to monitor the github issues/pull requests, if only to
On Thu, Nov 15, 2012 at 2:11 PM, Marc-Andre Lafortune
On Thu, Nov 15, 2012 at 1:01 PM, Luis Lavena <luislavena@gmail.com> wrote:
On Thu, Nov 15, 2012 at 1:06 PM, Zachary Scott <zachary@zacharyscott.net>
[#49370] [ruby-trunk - Bug #7358][Open] Wrong fd redirection on fork — "felipec (Felipe Contreras)" <felipe.contreras@...>
[#49416] make check: missing psych — Ramkumar Ramachandra <artagnon@...>
Hi,
On Fri, Nov 16, 2012 at 9:58 AM, Ramkumar Ramachandra
Luis Lavena wrote:
[#49463] [ruby-trunk - Feature #7375][Open] embedding libyaml in psych for Ruby 2.0 — "tenderlovemaking (Aaron Patterson)" <aaron@...>
On Sun, Nov 18, 2012 at 03:05:50AM +0900, vo.x (Vit Ondruch) wrote:
Dne 17.11.2012 21:19, Aaron Patterson napsal(a):
On 17 November 2012 21:34, V咜 Ondruch <v.ondruch@gmail.com> wrote:
Hello,
[#49468] [ruby-trunk - Feature #7378][Open] Adding Pathname#write — "aef (Alexander E. Fischer)" <aef@...>
[#49479] [ruby-trunk - Bug #7379][Open] Unexpected result of Kernel#gets on Windows 8 — "phasis68 (Heesob Park)" <phasis@...>
[#49518] [ruby-trunk - Bug #7383][Open] Use stricter cache check in load.c — "funny_falcon (Yura Sokolov)" <funny.falcon@...>
[#49536] [ruby-trunk - Feature #7388][Open] Object#embed — "zzak (Zachary Scott)" <zachary@...>
[#49543] [ruby-trunk - Feature #7390][Open] Funny Falcon Threads — "zzak (Zachary Scott)" <zachary@...>
[#49558] [ruby-trunk - Bug #7395][Open] Negative numbers can't be primes by definition — "zzak (Zachary Scott)" <zachary@...>
[#49868] How to stop spam from ruby-core — Heesob Park <phasis@...>
Hi,
[#49949] [ruby-trunk - Feature #7426][Assigned] Update Rdoc — "mame (Yusuke Endoh)" <mame@...>
(2012/11/27 13:33), drbrain (Eric Hodel) wrote:
On Tue, Nov 27, 2012 at 12:57 AM, SASADA Koichi <ko1@atdot.net> wrote:
On Nov 26, 2012, at 10:09 PM, Luis Lavena <luislavena@gmail.com> wrote:
[#50092] [ruby-trunk - Feature #7434][Open] Allow caller_locations and backtrace_locations to receive negative params — "sam.saffron (Sam Saffron)" <sam.saffron@...>
[#50264] [ruby-trunk - Feature #7457][Open] GC.stat to return "allocated object count" and "freed object count" — "ko1 (Koichi Sasada)" <redmine@...>
[#50306] Towards a better process for changing Ruby — Magnus Holm <judofyr@...>
Hey folks,
What I'd like to see is primarily better communication and release
Hello Magnus,
Endoh-san,
[#50312] How to stop spam message from redmine.ruby-lang.org — Heesob Park <phasis@...>
HI,
Hi,
[#50372] [ruby-trunk - Bug #7476][Open] missing "IP_TRANSPARENT" constant for IP sockets. — "elico (Eliezer Croitoru)" <eliezer@...>
2013/2/24 ko1 (Koichi Sasada) <redmine@ruby-lang.org>:
[ruby-core:49628] [ruby-trunk - Feature #7051] Extend caller_locations API to include klass and bindings. Allow caller_locations as a method hanging off Thread.
Issue #7051 has been updated by sam.saffron (Sam Saffron).
Apologies it has taken me so long to respond here.
> I concur with ko1's objection to having the bindings available. It would introduce *massive* performance overhead and kill many optimizations we implementers do currently or hope to do in the future.
I never really intended for this to be something that is on always, just a best-effort, optional thing. (if tracing is enabled you avoid optimisations, if not, you provide a best effort stack to the caller). Same goes for classes, if you can not provide them, do not, its a best effort API for diagnostics.
My point here is that the current API is very limiting. It comes with no option to provide granularity of data collected in the backtrace.
Let me illustrate some issues:
1. There is no way to peel off a portion of the backtrace.
Often when profiling rails I would like a backtrace that is limited to the frames in my application. To achieve this I would to something like the following:
# before entering my code
current_depth = caller_locations.length
# Problem, allocating a bunch of strings for filenames etc, I do not need
# This is very common as Rails starts off with a VERY deep frame after a ton of Rack stuff etc.
# in my code
partial_trace = caller_locations(0-current_depth) # Problem, negative depth is not supported - so I am forced to grab a full trace and discard my stuff
Ideally the API should allow you to opt-in to information and pass that through to vm_backtrace_to_ary and vm_backtrace_frame_ary etc. It should also allow for negative params.
A better API would be:
current_depth = caller_locations(0,-1, BacktraceInfo::None)
app_frames = caller_locations(0,-current_depth, BacktraceInfo::Label) # if I only happen to want labels
These changes make it much more efficient to gather stack traces at the correct granularity.
Then you set BacktraceInfo::Default to be Label & Path & LineNo, which allow you to add the fancy *best effort* Klass & Bindings
Overall this makes it much faster to profile stuff that has deep stack traces, you can cut down on allocations a lot.
---
As to my exception stuff.
def boom
raise "boom"
end
begin
boom
rescue => e
p e.backtrace
end
# ["t.rb:2:in `boom'", "t.rb:6:in `<main>'"]
Shouldn't the backtrace be stored in RubyVM::Backtrace::Location objects and then optionally grabbed using backtrace_locations or backtrace depending on how you feel?
I would go as far as saying you should allow for a user flag
Exception.backtrace_location_info = BacktraceInfo::Label
# and possibly
Exception.disable_backtraces = true
That allows you to gather less information in exceptions causing exceptions to be much faster.
----
As to naming
backtrace_locations is ok, though I personally prefer Stacktrace and Stackframe , #stacktrace
----------------------------------------
Feature #7051: Extend caller_locations API to include klass and bindings. Allow caller_locations as a method hanging off Thread.
https://bugs.ruby-lang.org/issues/7051#change-33142
Author: sam.saffron (Sam Saffron)
Status: Open
Priority: Normal
Assignee: ko1 (Koichi Sasada)
Category: core
Target version: 2.0.0
The new caller_locations api allows one to get label, base_label, path, lineno, absolute_path.
I feel this API should be extended some what and cleaned up a bit.
1. I think there should be complete parity with caller and backtrace APIs.
As it stands caller_locations is a fine replacement for `caller`, however the same code responsible for `caller` is also responsible for Thread#backtrace. As it stands there is no equivalent Thread#backtrace_locations API that allows one to grab OO backtraces for a thread.
For sampling profilers a common technique is to spin a thread that grabs stack traces from a profiled thread.
I played around with some of this here: https://github.com/SamSaffron/stacktrace/blob/master/test/test_stacktrace.rb
2. I think there should be a way to get the class the method belongs to where possible.
At the moment you need to use something like ruby2ruby to determine the class of a frame in a backtrace. Getting the class is actually very important for auto-instrumentation techniques. A general approach is to grab stack traces, determine locations that seemed to be called a lot, and then instrument them. Trouble is, without a class it is very hard to pick a point to instrument.
I got this working with my stacktrace gem so I think it is feasible.
3. Ability to grab bindings up the call chain
For some advanced diagnostic techniques it is very handy to grab bindings up the chain, that way you can print out local vars in a calling method and so on. It would be handy if this api exposed bindings.
4. Naming and longer term deprecation of caller
The name caller_locations to me feels a bit unnatural, as an API it is superior in all ways to the current caller, yet is far harder to type or remember. I am not really sure what it should be named but caller feels a bit wrong. Also it feels very tied to MRI returning RubyVM:::Backtrace::Location , Location seems to me in the wrong namespace. Is JRuby and Rubinius going to be expected to add this namespace? Is this going to be spec?
Has any though been given to longer term deprecation of 'caller'.
5. What about exceptions?
Exception has no equivalent of caller_locations, for exceptions it makes much more sense to cut down on allocations and store a thinner stack trace object, in particular for the massively deep stacks frameworks like rails have. Then materialize the strings if needed on iteration through Exception#backtrace
--
http://bugs.ruby-lang.org/