Received: by 10.224.213.1 with SMTP id gu1mr1202665qab.7.1349189940535; Tue, 02 Oct 2012 07:59:00 -0700 (PDT) X-BeenThere: v8-dev@googlegroups.com Received: by 10.224.101.68 with SMTP id b4ls924746qao.0.gmail; Tue, 02 Oct 2012 07:58:59 -0700 (PDT) Received: by 10.224.189.75 with SMTP id dd11mr1203958qab.6.1349189939700; Tue, 02 Oct 2012 07:58:59 -0700 (PDT) Received: by 10.224.189.75 with SMTP id dd11mr1203957qab.6.1349189939692; Tue, 02 Oct 2012 07:58:59 -0700 (PDT) Return-Path: <3MwFrUBUJAGoKPZWUQcUKWLMZMdQMe-PZOUIQT....@2uix4h7xygsz66weerlq.apphosting.bounces.google.com> Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by gmr-mx.google.com with ESMTPS id ek33si283024qcb.0.2012.10.02.07.58.59 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 02 Oct 2012 07:58:59 -0700 (PDT) Received-SPF: pass (google.com: domain of 3MwFrUBUJAGoKPZWUQcUKWLMZMdQMe-PZOUIQT....@2uix4h7xygsz66weerlq.apphosting.bounces.google.com designates 209.85.216.69 as permitted sender) client-ip=209.85.216.69; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of 3MwFrUBUJAGoKPZWUQcUKWLMZMdQMe-PZOUIQT....@2uix4h7xygsz66weerlq.apphosting.bounces.google.com designates 209.85.216.69 as permitted sender) smtp.mail=3MwFrUBUJAGoKPZWUQcUKWLMZMdQMe-PZOUIQT....@2uix4h7xygsz66weerlq.apphosting.bounces.google.com; dkim=pass header...@chromium.org Received: by qam2 with SMTP id 2so1285779qam.8 for ; Tue, 02 Oct 2012 07:58:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:reply-to:x-google-appengine-app-id:message-id:date :subject:from:to:cc:content-type; bh=kL1L/P4ZPtLwRJvDltVw2X/rF+6fSL+urNwyqytHTPg=; b=f9x7aLIfb46yQt0xN5ykKms9hC5frkwmmtMRm2VDCxmMznRggoIhuzQi1kCUzGhVta zEuewN4eUV172Tfqe10xgOl3xLLn4IZhgNw/JwIsmuoPr74oKdS1/ihWrDYSsSqQsIYu 4IY/1Qjgh9HpRFpPmbp4/r2QANRD0MHXUUJhc= MIME-Version: 1.0 Received: by 10.58.220.97 with SMTP id pv1mr5301864vec.13.1349189939556; Tue, 02 Oct 2012 07:58:59 -0700 (PDT) Reply-To: da...@chromium.org, mstarzin...@chromium.org, v8-dev@googlegroups.com Message-ID: <047d7bd6b94614f1bb04cb14c...@google.com> Date: Tue, 02 Oct 2012 14:58:59 +0000 Subject: Re: Age code to allow reclaiming old unexecuted functions (issue 10837037) From: mstarzin...@chromium.org To: da...@chromium.org Cc: v8-dev@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Second round with some follow-up comments, now that I am working on the incremental code flushing. Also as discussed offline, this CL will require rebasing after I land one of my CLs. https://codereview.chromium.org/10837037/diff/16023/src/mark-compact.cc File src/mark-compact.cc (right): https://codereview.chromium.org/10837037/diff/16023/src/mark-compact.cc#newcode1205 src/mark-compact.cc:1205: return function->code()->IsOld() && IsFlushable(heap, shared_info); See comment below. https://codereview.chromium.org/10837037/diff/16023/src/mark-compact.cc#newcode1210 src/mark-compact.cc:1210: if (!shared_info->code()->IsOld()) return false; 1) We shouldn't remove the check for the marking bit of the code, because it makes sure that we don't throw away un-optimized code that is required for bailout from optimized code. 2) Also I don't think it makes much sense to flush code that is strongly reachable through other paths, that will rather lead to increased memory consumption because we keep recompiling code without actually collecting it. 3) Also it might be better to move this check further to the bottom, because it is more expensive than the others I guess. But I don't have a strong opinion about this last point. https://codereview.chromium.org/10837037/