Skip to content

Instantly share code, notes, and snippets.

View smarter's full-sized avatar

Guillaume Martres smarter

View GitHub Profile
% jstack 368186
2018-07-05 02:28:18
Full thread dump OpenJDK 64-Bit Server VM (25.171-b11 mixed mode):
"Attach Listener" #25 daemon prio=9 os_prio=0 tid=0x00007fda08001000 nid=0x59ff3 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"ForkJoinPool-1-worker-0" #24 daemon prio=5 os_prio=0 tid=0x00007fd9f4e61800 nid=0x59ec3 in Object.wait() [0x00007fda513ac000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
@smarter
smarter / fmap.scala
Last active November 18, 2019 08:55
Should work with 0.20.0-RC1
// Compiles with https://github.com/lampepfl/dotty/pull/4672
// ./bin/dotc -classpath "$(coursier fetch -p org.typelevel:cats-core_2.13:2.0.0)" out/fmap.scala
import cats._
import cats.implicits._
object Test {
val fmap: [A, B] -> (A => B) => [F[_]] -> F[A] => (given Functor[F]) => F[B] = [A, B] -> (f: A => B) => ([F[_]] -> (fa: F[A]) => (given ev: Functor[F]) => fa.map(f))
val addOne = fmap((x: Int) => x + 1)
// Compiles with https://github.com/lampepfl/dotty/pull/4672
// ./bin/dotc -classpath "$(coursier fetch -p org.typelevel:cats-effect_2.12:1.0.0-RC2)" out/blocking.scala
import scala.language.implicitConversions
import cats.implicits._
import cats.effect._
import scala.concurrent.ExecutionContext
object Blocking {
# allocated trees: 3316387
Detail of allocated trees:
(dotty.tools.dotc.core.Phases$Phase.$anonfun$runOn$1(Phases.scala:293),350797)
(dotty.tools.dotc.parsing.Parsers$Parser.makeIdent(Parsers.scala:527),165153)
(dotty.tools.dotc.transform.Erasure$Typer.typedValDef(Erasure.scala:540),120536)
(dotty.tools.dotc.typer.Typer.$anonfun$typedValDef$1(Typer.scala:1361),81026)
(dotty.tools.dotc.transform.Erasure$Typer.typedApply(Erasure.scala:507),79324)
(dotty.tools.dotc.transform.Erasure$Typer.typedDefDef(Erasure.scala:575),70002)
(dotty.tools.dotc.typer.Typer.$anonfun$typedIdent$1(Typer.scala:409),68091)
(dotty.tools.dotc.transform.PatternMatcher$Translator.emit(PatternMatcher.scala:911),68043)
# allocated trees: 3169938
Detail of allocated trees: (dotty.tools.dotc.core.Phases$Phase.$anonfun$runOn$1(Phases.scala:293),350797)
(dotty.tools.dotc.parsing.Parsers$Parser.makeIdent(Parsers.scala:527),165152)
(dotty.tools.dotc.transform.Erasure$Typer.typedValDef(Erasure.scala:540),120536)
(dotty.tools.dotc.typer.Typer.$anonfun$typedValDef$1(Typer.scala:1361),81026)
(dotty.tools.dotc.transform.Erasure$Typer.typedDefDef(Erasure.scala:575),70002)
(dotty.tools.dotc.transform.Erasure$Typer.typedApply(Erasure.scala:507),68626)
(dotty.tools.dotc.typer.Typer.$anonfun$typedIdent$1(Typer.scala:409),68091)
(dotty.tools.dotc.transform.PatternMatcher$Translator.emit(PatternMatcher.scala:911),68043)
(dotty.tools.dotc.typer.Applications$TypedApply.app0$1(Applications.scala:599),60317)
ZSH_HIGHLIGHT_STYLES[alias]='none'
ZSH_HIGHLIGHT_STYLES[unknown-token]='none'
ZSH_HIGHLIGHT_STYLES[builtin]='none'
ZSH_HIGHLIGHT_STYLES[function]='none'
ZSH_HIGHLIGHT_STYLES[command]='none'
ZSH_HIGHLIGHT_STYLES[precommand]='none'
ZSH_HIGHLIGHT_STYLES[path]='none'
ZSH_HIGHLIGHT_STYLES[path_prefix]='none'
ZSH_HIGHLIGHT_STYLES[path_approx]='none'
[log frontend] ==> search implicit scala.collection.generic.CanBuildFrom[scala.collection.SortedMap[dotty.tools.dottydoc.model.comment.Inline, dotty.tools.dottydoc.model.comment.Block], String, That], arg = <empty>: <notype>?
[log frontend] ==> computeEligible scala.collection.generic.CanBuildFrom[scala.collection.SortedMap[dotty.tools.dottydoc.model.comment.Inline, dotty.tools.dottydoc.model.comment.Block], String, (?)] in ((text: String): dotty.tools.dottydoc.model.comment.HtmlParsers.StringToMarkdown)(dotty.tools.dottydoc.model.comment.HtmlParsers.StringToMarkdown), ((markdown: com.vladsch.flexmark.ast.Node): dotty.tools.dottydoc.model.comment.HtmlParsers.MarkdownToHtml)(dotty.tools.dottydoc.model.comment.HtmlParsers.MarkdownToHtml), ((text: String): dotty.tools.dottydoc.model.comment.HtmlParsers.StringToWiki)(dotty.tools.dottydoc.model.comment.HtmlParsers.StringToWiki), ((body: dotty.tools.dottydoc.model.comment.Body): dotty.tools.dottydoc.model.comment.HtmlParsers.BodyToHtml)(dotty.tools.dottydoc.mode
[log frontend] ==> search implicit scala.collection.generic.CanBuildFrom[scala.collection.SortedMap[dotty.tools.dottydoc.model.comment.Inline, dotty.tools.dottydoc.model.comment.Block], String, That], arg = <empty>: <notype>?
[log frontend] ==> computeEligible scala.collection.generic.CanBuildFrom[scala.collection.SortedMap[dotty.tools.dottydoc.model.comment.Inline, dotty.tools.dottydoc.model.comment.Block], String, (?)] in ((text: String): dotty.tools.dottydoc.model.comment.HtmlParsers.StringToMarkdown)(dotty.tools.dottydoc.model.comment.HtmlParsers.StringToMarkdown), ((markdown: com.vladsch.flexmark.ast.Node): dotty.tools.dottydoc.model.comment.HtmlParsers.MarkdownToHtml)(dotty.tools.dottydoc.model.comment.HtmlParsers.MarkdownToHtml), ((text: String): dotty.tools.dottydoc.model.comment.HtmlParsers.StringToWiki)(dotty.tools.dottydoc.model.comment.HtmlParsers.StringToWiki), ((body: dotty.tools.dottydoc.model.comment.Body): dotty.tools.dottydoc.model.comment.HtmlParsers.BodyToHtml)(dotty.tools.dottydoc.mode
[log frontend] ==> search implicit scala.collection.generic.CanBuildFrom[scala.collection.SortedMap[dotty.tools.dottydoc.model.comment.Inline, dotty.tools.dottydoc.model.comment.Block], String, That], arg = <empty>: <notype>?
[log frontend] ==> computeEligible scala.collection.generic.CanBuildFrom[scala.collection.SortedMap[dotty.tools.dottydoc.model.comment.Inline, dotty.tools.dottydoc.model.comment.Block], String, (?)] in ((text: String): dotty.tools.dottydoc.model.comment.HtmlParsers.StringToMarkdown)(dotty.tools.dottydoc.model.comment.HtmlParsers.StringToMarkdown), ((markdown: com.vladsch.flexmark.ast.Node): dotty.tools.dottydoc.model.comment.HtmlParsers.MarkdownToHtml)(dotty.tools.dottydoc.model.comment.HtmlParsers.MarkdownToHtml), ((text: String): dotty.tools.dottydoc.model.comment.HtmlParsers.StringToWiki)(dotty.tools.dottydoc.model.comment.HtmlParsers.StringToWiki), ((body: dotty.tools.dottydoc.model.comment.Body): dotty.tools.dottydoc.model.comment.HtmlParsers.BodyToHtml)(dotty.tools.dottydoc.mode
5755 (4,40%) dotty.tools.dotc.core.Symbols$Symbol.denot
4888 (3,74%) InstanceKlass::oop_push_contents(PSPromotionManager*, oopDesc*)
2674 (2,05%) oopDesc* PSPromotionManager::copy_to_survivor_space<false>(oopDesc*)
2381 (1,82%) ParMarkBitMap::live_words_in_range(HeapWord*, oopDesc*) const
1420 (1,09%) PSPromotionManager::drain_stacks_depth(bool)
1299 (0,99%) dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom
1146 (0,88%) dotty.tools.dotc.core.Types$NamedType.denotAt
1078 (0,82%) scala.runtime.BoxesRunTime.equals2
1074 (0,82%) dotty.tools.dotc.core.Scopes$MutableScope.lookupEntry
977 (0,75%) itable stub