åžžã«éçºããããœãªã¥ãŒã·ã§ã³ã蚱容å¯èœãªããã©ãŒãã³ã¹ã§æ©èœãããšã¯éããŸããã ç¹ã«é¡§å®¢ã®ããã«ã ãŸããã¡ã¢ãªãè³Œå ¥ããŠã·ã¹ãã èŠä»¶ãåŒãäžãããšããææ¡ãæ©èœããªãå ŽåïŒç§ã¯æåããããšããããŸããïŒãæé©åãè¡ãå¿ èŠããããŸãã ãã®ãããã¹ããããŠã©ããã ãã§ãªããDotNext 2016 Moscowã«ã³ãã¡ã¬ã³ã¹ã§çŽ æŽããã女ã®åã§ãããåªããã¹ãã·ã£ãªã¹ãã§ãããè¬æŒè ã§ããDinaãšè©±ããŸããã ãŽãŒã«ãã¹ã¿ã€ã³ ã
Dinaã¯ãAternityã®ã·ãã¢ãœãããŠã§ã¢ãšã³ãžãã¢ã§ãã Aternityã¯ãæ°çŸäžå°ã®PCããã³ã¢ãã€ã«ããã€ã¹çšã®ç£èŠããŒã«ãéçºããŠããŸãã Dinaã¯ãããŸããŸãªãœãŒã¹ããããŒã¿ãåéããããã®äž»èŠãªã¡ã«ããºã ãæ åœããããŒã ã§åããŠããŸãã
ç£èŠãœãªã¥ãŒã·ã§ã³ã«ã€ããŠ
-ç£èŠã®ããã®æ¢æã®ãœãªã¥ãŒã·ã§ã³ã¯äœã§ããïŒ åœŒãã¯ã©ã®ããã人æ°ããããŸããïŒ ã©ã®ã¿ã¹ã¯ã解決ããŸããïŒ
-ç£èŠããŒã«ã¯ãçµã¿èŸŒã¿ãŠããããšåå¥ã®ç¬ç«ããããã°ã©ã ã®2ã€ã®ã¡ã€ã³ã°ã«ãŒãã«åããããšãã§ããŸãã
æåã®ã«ããŽãªã«ã¯ãETWïŒWindowsã®ã€ãã³ããã¬ãŒã¹ïŒãããã©ãŒãã³ã¹ã«ãŠã³ã¿ãŒãªã©ã®ã€ã³ãã©ã¹ãã©ã¯ãã£ããããŸãã ãããã¯ãã§ã«Windowsã«ããªã€ã³ã¹ããŒã«ãããŠããŸãã .NETïŒãŸãã¯C ++ïŒAPIã䜿çšããŠãããŒã¿åéçšã®æ¢æã®ãœãªã¥ãŒã·ã§ã³ã䜿çšããããããŒã«ã«ã³ã³ããŒãã³ããåã蟌ãããšãã§ããŸãã ãããã®ãœãªã¥ãŒã·ã§ã³ã¯ããŸãã«ããªããæããã®ãæ£ç¢ºã«å®çŸããã®ã«åœ¹ç«ã¡ãŸãã ããããããã§ã®äž»ãªèšèã¯å®çŸããããšã§ãã åºæ¬çã«ããã¹ãŠã®äœæ¥ãèªåã§è¡ãå¿ èŠããããŸãã ã¯ããWindows APIåŒã³åºãããã€ã§ãããã¯ããŠããã«å€ãã®ããŒã¿ãååŸã§ããŸãããããã«ã¯ç¹å¥ãªã¢ãããŒããšæ³šæãå¿ èŠã§ãã
å®æããããŒã«ã®äžã«ã¯ãå€ãã®è£œåããããŸãã ãŸããã³ãŒãã«åã蟌ãŸããŠããã©ã€ãã©ãªãããšãã°New Relicãããã°ã©ããŒã®ä»å ¥ãå¿ èŠãšããªãå®å šã«æ¢è£œã®ç£èŠã·ã¹ãã ã ããšãã°ãAternityãç§ã¯ãã ä»äºãããŠããŸãã
-é ããæ©ãããååãªæ¢è£œã®ããŒã«ããªãå Žåã«ç¶æ³ãçºçããŸãã ãŸãã補åã«ã³ãŒããèšè¿°ããå¿ èŠããããŸãã .NET FrameworkãšèšèªããŒã«ã¯ãéçºãç°¡çŽ åããäœããæäŸããŸããïŒ
-ã¯ããééããªãã ãã¡ãããããã©ãŒãã³ã¹ã«ãŠã³ã¿ãŒã«ã¯äŸ¿å©ãª.NET APIããããMicrosoftãéçºäžã®TraceEventãšåŒã°ããç¡æã§å©çšå¯èœãªNuGetããã±ãŒãžã䜿çšããŠETWã䜿çšã§ããŸãã æè¿ããšããã§ãå瀟ã¯ãœãŒã¹ã³ãŒããå ¬éããŸããã ãªããžããªãGitHubã§å©çšå¯èœã«ãªããŸããã
ãããã¯ãäžè¬çãªã¢ãããŒãã«é¢ããããã€ãã®èšèã§ããã å¥åã®.NETãã¬ãŒã ã¯ãŒã¯ïŒWCFãWPFãEntity Frameworkãªã©ïŒã«ã¯ãã³ãŒããåã蟌ã¿ãå¿ èŠãªããŒã¿ãåéã§ããæ¡åŒµãã€ã³ãããããŸãã ãã1ã€ã®èå³æ·±ããªãã·ã§ã³ã¯ãClrMDã䜿çšããããšã§ãã ããã¯ã.NETã®ãããã°APIã®ã»ããã§ãïŒMicrosoftããµããŒããããªãŒãã³ãœãŒã¹ã§ããããGitHubããã³NuGetã§å©çšå¯èœã§ã ïŒã
ClrMDã䜿çšãããšãã³ãŒã«ã¹ã¿ãã¯ãååŸãããããããŒãžããŒãã調ã¹ããããããšãã§ããŸãã ãªãŒããŒããããé«ãããããã ãã«ããã®ããŒã«ã®ã¿ã䜿çšããŠå€§èŠæš¡ãªç£èŠãè¡ãããšã¯äžå¯èœã ãšæããŸãããä»ã®ããŒã«ã䜿çšããŠåé¡ãèŠã€ããå ŽåãClrMDã䜿çšãããšç¹å®ã®æ å ±ãååŸã§ããŸãã ããšãã°ãã¢ããªã±ãŒã·ã§ã³ã®ããŒãã倧ããããå Žåã¯ãã©ã®ãªããžã§ã¯ããæãã¡ã¢ãªãæ¶è²»ããŠããããå€æã§ããŸãã
Win32 APIãããã«æ·±ãæãäžãããå Žåã¯ãNETãç¹ã«åœ¹ç«ã€ããšã¯ãªãã®ã§ãC ++ã«é Œããªããã°ãªããŸããã ããšãã°ã Microsoft Detoursã䜿çšããŸã ã
ããªãã¯ã³ã³ãããŒã«ã倱ã£ãŠã¯ãããŸãã
-åœç€Ÿã®ãœãããŠã§ã¢è£œåã皌åããŸããã ã³ã³ãããŒã«ã倱ããŸãããããããšãæ å ±ãåéããæ¹æ³ããããŸããïŒ ãããè¡ãæè¯ã®æ¹æ³ã¯äœã§ããïŒ
-ããïŒ ããªããã³ã³ãããŒã«ã倱ãããšã¯ãããŸããã ãµãŒããŒãŸãã¯ã¯ã©ãŠã補åã«ã€ããŠè©±ããŠããå Žåã¯ããã¡ãããç°å¢ãå®å šã«å¶åŸ¡ãããŠãããããããŒãºã«åã£ãç£èŠãœãªã¥ãŒã·ã§ã³ã䜿çšã§ããŸãã
ãã¹ã¯ãããã¢ããªã±ãŒã·ã§ã³ãéçºããŠããå ŽåããŠãŒã¶ãŒã«ç£èŠãã¬ãŒã ã¯ãŒã¯ã®ã€ã³ã¹ããŒã«ãèŠæ±ããããšã¯ã§ããŸããã ããã¯ãã¢ããªã±ãŒã·ã§ã³ãç¬ç«ããŠç£èŠããæ©èœãçµã¿èŸŒãå¿ èŠãããããšãæå³ããŸãã ãã¡ãããããã§ã¯ãæ¢è£œã®ã©ã€ãã©ãªïŒNew Relicãªã©ïŒã䜿çšããããšããæ¢ã«è¿°ã¹ã.NET APIã䜿çšããŠèªåã§å®è£ ããããšãã§ããŸãã
å®éãæè¿ãããã©ãŒãã³ã¹ã«ãŠã³ã¿ãŒã䜿çšããŠåäœããããã»ããµè² è·ã®ç£èŠãã¢ããªã±ãŒã·ã§ã³ã«è¿œå ãããããããŒãžã£ãŒã«èª¬åŸããç¹å®ã®ãããå€ã«éããããETWã䜿çšããŠã³ãŒã«ã¹ã¿ãã¯ã®çµ±èšã®åéãéå§ããããšè©Šã¿ãŸããã
-ã©ã®ãããªæž¬å®èª€å·®ã蚱容ã§ãããšèããããã©ã®ããã«ãããéæããŸããïŒ
-æ£ç¢ºãã¯äž»ãªä»äºã§ã¯ãªããšæããŸãã 補åãã©ã®ããã«æ©èœããããäžè¬çã«ç解ãããããšã¯æããã§ãã ãªãªãŒã¹ããã補åã®ç£èŠã¯ãéçºäžã®ãããã°ããã³ãããã¡ã€ãªã³ã°ãšåãã§ã¯ãããŸããã ããšãã°ãClrMDã䜿çšãããªã©ãéçšäžã«ããå€ãã®ããŒã¿ãååŸããæ¹æ³ã¯åžžã«ãããŸãããé«ã粟床ãæ¯æãå¿ èŠããããŸãã ãã¡ãããæã ãããè¡ãããšãã§ããŸããããããŸã§ã®ãšãããç§ã¯ãã®ç¶ç¶çãªäœ¿çšã®ãã€ã³ããèŠãŠããŸããã ããã©ãŒãã³ã¹ã®åé¡ã«çŽé¢ããå Žåããããã¡ã€ã©ãŒãŸãã¯ãããã¬ãŒã«çæéæ¥ç¶ã§ããŸãã çæ³çãªã±ãŒã¹ã§ã¯ãç£èŠã¯äžè¬çãªã¢ã€ãã¢ãæäŸããåé¡ãçºèŠããããããªãã£ã¹ã«æ»ã£ãŠããŒã«ã«ã«åçŸããå°çšããŒã«ã䜿çšããŠèª¿ã¹ãŸãã
-ã¡ãœããã®ããã©ãŒãã³ã¹ã枬å®ããå¿ èŠããããšããŸãããã ãããããµãŒãããŒãã£ã®ã¢ã¯ã·ã§ã³ãããã«åœ±é¿ãäžããªããšãã確å®æ§ã¯ãããŸãããããšãã°ãã¬ããŒãžã³ã¬ã¯ã¿ãŒã§ãã 枬å®ã®èœãšãç©Žãšãã®åé¿æ¹æ³ã¯ïŒ
-ã¡ãœããã®ããã©ãŒãã³ã¹ã®æå³ã«ãã£ãŠç°ãªããŸãã ãã¢ã«ãŽãªãºã ãããã©ãŒãã³ã¹ã«ã€ããŠè©±ããŠããå Žåã¯ãå®éã®ç°å¢ã§ã®åäœäžã«æž¬å®ããå¿ èŠã¯ãããããããŸãããããã¹ããããŒã«ã«ã§èšè¿°ããã¬ããŒãžã³ã¬ã¯ã·ã§ã³ãåæ¢ããã¹ã¯ãããã¡ã€ã«ããªãã«ããã©ããããããé»æºã«æ¥ç¶ããäžè¬çã«èããŠããããšãå®è¡ã§ããŸãå¿ èŠã§ãã
ããããå®éã«ã¯ããããã®äžæããã€çºçããããå¶åŸ¡ããæ¹æ³ã¯ãããŸããã æ¬åœã«ã§ããããšã¯ãäžæãçºçããææãšäžææéãååŸããããšã§ãã ETWã¯ãã¬ããŒãžã³ã¬ã¯ã¿ããããã¯ãŒã¯ããã£ã¹ã¯ã¢ã¯ã»ã¹ãªã©ã«é¢ããæ å ±ãæäŸããŸãã 次ã«ãããããã¹ãŠã®ããŒã¿ãäžç·ã«åæããããã©ãŒãã³ã¹ã«ã€ããŠçµè«ãåºãããšãã§ããŸãã å ·äœçã«ã¯ãã¬ããŒãžã³ã¬ã¯ã¿ãŒã§éèŠãªå Žæãããå Žåã¯ãGC.TryStartNoGCRegionã䜿çšã§ããŸãã
-å°ãããããªçè«ã«è§ŠããŸãããã 倧éã®ããŒã¿ãæã€å€§èŠæš¡ãªã·ã¹ãã ã§ã¯ãæ°åŠã®ææã䜿çšããããšããèŠæããããŸãã å€ãã®çè«ããããŸããïŒ çµ±èšçææ³ã¯ã©ãããã人æ°ããããŸããïŒ ããŒã«ã§äœ¿çšãããŠããŸããïŒ
ãç§ãç¥ã£ãŠããããŒã«ã¯ããŒã¿ãåéããã ãã§ããã ãããŠã誰ãããã®ããŒã¿ãåŠçããæ¹æ³ã決å®ããŸãã çæãã¹ãããšã®1ã€ã¯ãWindows APIãã€ã³ã¿ãŒã»ãããã代ããã«ãµã³ããªã³ã°ã䜿çšããå Žåãããããšã§ããWindowsAPIã¯ããã©ãŒãã³ã¹ã®ç¹ã§éåžžã«é«äŸ¡ã§ãã æ¬è³ªçã«ãä¿¡çšãèœãšããšããŸããªã€ãã³ãã®æ°ãéå°è©äŸ¡ãããå¯èœæ§ããããŸãã ããã¯ãããã»ããµã®äœ¿çšã枬å®ããå Žåã«ç¹ã«é¡èã§ããã枬å®ã¯ãå°ããªã¢ã¯ã·ã§ã³ã«é¢ããæ å ±ãçµ±èšçã«ååŸããã®ã«ååãªæéãèŠããããšã確èªããå¿ èŠããããŸãã ããããäžæ¹ã§ããããã®ããããªããšã¯æããã«ããã©ãŒãã³ã¹ã®åé¡ãåŒãèµ·ãããã®ã§ã¯ãªããããå€ãã®æéãšããå°ãªãæéãææ¡ãããå Žåã«ã¯ããããéèŠã§ã¯ãããŸããã ãããŠããã®ãããªæž¬å®ã§æ£ç¢ºãªå®è¡æéãååŸããããšã¯çµ¶å¯Ÿã«äžå¯èœã§ãã
ã·ã¹ãã èšèšæ®µéã§ã®ç£èŠã«ã€ããŠ
-ã·ã¹ãã ãèšèšãããšãã«ãå°æ¥ã®ç£èŠã®ããã«æ¡åŒµãã€ã³ããé 眮ããå¿ èŠããããŸããïŒ æ¢åã®ã¢ãããŒããšæšå¥šäºé ã¯ãããŸããïŒ
-ã¯ããééããªãïŒ ããã«ã€ããŠã¯ãããŸã§èšåããŠããŸããããç¬èªã®ããã©ãŒãã³ã¹ã«ãŠã³ã¿ãŒãšETWãã°ãäœæã§ããŸãã ãã®ãããã·ã¹ãã ã®éçºäžã«ãã©ã®å Žæãèå³æ·±ãããã©ã®ããŒã¿ãåéãããã«ã€ããŠèããå¿ èŠããããŸãã çæ³çã«ã¯ãDevOpsãããã°ã©ããŒã®ä»å ¥ãªãã«å¿ èŠãªãã¹ãŠãç£èŠã§ããããã«ãã·ã¹ãã ãèšèšããå¿ èŠããããŸãã
-Visual Studioãªã©ã®éçºããŒã«ããã®æ¯æŽãåŸ ã€äŸ¡å€ã¯ãããŸããïŒ
-ããã§ããç°å¢ã«äŸåããŸãã ãã¡ãããVisual Studioã«ã¯ãéçºäžã®ãããã¡ã€ãªã³ã°çšã®åªããããŒã«ããããŸãã ãã ããã¢ããªã±ãŒã·ã§ã³ã®æäœäžã¯å©ããåŸ ããªãã§ãã ããã ãŸãããããã¡ã€ãªã³ã°ã«ã¯å€ãã®ãªãŒããŒããããããããã§ãã 第äºã«ãã©ã€ã»ã³ã¹ã®å¶éãããå Žåã®ã¿ããŠãŒã¶ãŒã®ã³ã³ãã¥ãŒã¿ãŒã«Visual Studioãã€ã³ã¹ããŒã«ã§ããŸããã ãµãŒããŒãžã®ãªã¢ãŒãæ¥ç¶ãããããã°ããã®éã¢ããªã±ãŒã·ã§ã³ãåæ¢ã§ããå Žåã¯ãVisual Studioãªã¢ãŒããããã¬ãŒã䜿çšã§ããŸãã ããããããã¯ãŸã ç£èŠã§ã¯ãªããããã°ã§ãã
-å€ãã¯ãç£èŠäžã«ååŸããèšå€§ãªéã®çããŒã¿ãåŠçããå¿ èŠã«çŽé¢ããŠããŸãã èªååããããšã¯å¯èœã§ããïŒ
ãã¯ãããã¡ãããã ETWã䜿çšããå ŽåãTraceEventã䜿çšããŠããªã³ã©ã€ã³ãŸãã¯ãªãã©ã€ã³ã§ã€ãã³ããåæããããã€ãã®.NETã³ãŒããäœæããããšãã§ããŸãã å¥ã®ããŒã¿ãœãŒã¹ã䜿çšããçµæãæšæºåœ¢åŒã§ããå Žåãåæã«ã¯ä»»æã®ããã°ã©ãã³ã°èšèªã䜿çšã§ããŸãã ãããŠãã¡ãããç§ãã¡ã®æ代ã«ã¯ãé©ãã»ã©å€ãã®æ¢è£œã®ããã°ã©ã ãšåæãã©ãããã©ãŒã ããããããŒã¿ãçŸãã圢ã§åŠçããããã·ã¥ããŒãã«åçã«è¡šç€ºããããšãã§ããŸãã
-çŸåšãç£èŠããŒã«ã¯ã©ã®ãããªåé¡ã«çŽé¢ããŠããŸããïŒ ãããŠãéçºã¯ã©ã®æ¹åã«åãã£ãŠããŸããïŒ
-æãå·®ãè¿«ã£ãåé¡ã¯ãªãŒããŒããããšããŒã¿ã®éå°æåã ãšæããŸãã ç£èŠã®ããã倧ããªããã©ãŒãã³ã¹ã·ã³ã¯ãèš±å¯ããããšã¯ã§ããŸããã ããã«ããŠãŒã¶ãŒã¯ãã¢ããªã±ãŒã·ã§ã³ãåã³ã³ãã€ã«ãŸãã¯åèµ·åããããšãªããç£èŠå¯Ÿè±¡ãšæ§æãåçã«å€æŽã§ããå¿ èŠããããŸãã ããã¯ç¹ã«èšŒåžååŒæãšè»éã«åœãŠã¯ãŸããŸãã
Windowsã§ç¹ã«äžè¶³ããŠãããã1ã€ã®ããšã¯ãeBFP for Linuxã®ãããªWindows APIã®åŒã³åºããåçã«ã€ã³ã¿ãŒã»ããããæ©èœã§ãã çŸåšãç§ãã¡ã¯å€§éã®ããŒã¿ã«çŽé¢ããŠãããããã³ã³ãããŒã«ããã«ã¯ãŸããŸã人æ°ãé«ãŸã£ãŠããã絶ããå€åããèŠä»¶ã«åŸã£ãŠæ å ±ãã°ã«ãŒãåããåçã«è¡šç€ºããããšãã§ããŸãã
ãã£ã㯠ã12æ9æ¥ã«ã©ãã£ãœã³ã¹ã©ãã£ã³ã¹ã«ã€ããã«ã§éå¬ãããDotNext 2016ã¢ã¹ã¯ã¯äŒè°ã®æåã®ã»ã¯ã·ã§ã³ã§è¬æŒããŸãã ããã§ç»é²ã§ããŸã ã
Dinaã®ã¬ããŒãã«å ããŠã次ã®ããšãèãããšãã§ããŸãã
â¬.NET CoreïŒæå 端
HardwareããŒããŠã§ã¢ãçµã£ãŠããã©ãŒãã³ã¹ãžã¥ãŒã¹ãäœã
⬠ã€ã³ããªãžã§ã³ããªãã£ããããããšèªç¥ãµãŒãã¹
⬠ã¹ã¿ãã¯ãªãŒããŒãããŒ-ããã©ãŒãã³ã¹ããã¹ãŠã§ãïŒ
⬠é«åºŠãªXamarin.Forms
â¬C ++ããCïŒ
arithmeticç®è¡ã«ã€ããŠè©±ãç¶ããŸã
â¬ASP.NET SignalRïŒWebéçºã§æ¬åœã«éèŠã«ãªã£ãŠããçç±
ã.NETã®äŸå€çãªäŸå€
runtimeã©ã³ã¿ã€ã ã§ã®.NETã³ãŒãã®å€æŽ
⬠ãšã³ãããŒãšã³ãJIT
Stackã¹ã¿ãã¯ãªãŒããŒãããŒã¿ã°ã®ããã©ãŒãã³ã¹ãã¥ãŒãã³ã°
ïŒCïŒã¹ã¯ãªãã-ãããŸã§èããããªãã£ãå Žæã§CïŒã䜿çšã§ããçç±ãšæ¹æ³
⬠ãã«ãã¹ã¬ãããã£ãŒããã€ã
Every ãã¹ãŠãéããããŸãã¯ã±ãŒãã«äŒãïŒCïŒMakeïŒ
ã.NET éçºè åãã®WinDbg Superpowers
newæ°ãã.NET Coreããã³.NET Platform Standardã®æŠèŠ
ã.NET ãã©ãããã©ãŒã ã§èŠã€ãã£ãè匱æ§ãšãã¢ããªã±ãŒã·ã§ã³ã§ããããç¹°ãè¿ããªãæ¹æ³
C CïŒ7ã®æ°æ©èœ