{"id":1039,"date":"2014-08-18T21:19:30","date_gmt":"2014-08-18T12:19:30","guid":{"rendered":"http:\/\/43.203.250.216\/?p=1039"},"modified":"2020-12-30T17:01:05","modified_gmt":"2020-12-30T08:01:05","slug":"cygwin%ec%97%90%ec%84%9c-android-systrace-%ec%8b%a4%ed%96%89-%eb%ac%b8%ec%a0%9c","status":"publish","type":"post","link":"https:\/\/litcoder.com\/?p=1039","title":{"rendered":"Cygwin\uc5d0\uc11c Android systrace \uc2e4\ud589 \ubb38\uc81c"},"content":{"rendered":"\n<p>2014\ub144 8\uc6d4 \ud604\uc7ac, Cygwin\uc73c\ub85c systrace\ub97c \uc0ac\uc6a9\ud558\ub824\uace0 \ud558\uba74 zlib \uad00\ub828\ud55c error\uac00 \ub098\uba74\uc11c \ub3d9\uc791\ud558\uc9c0 \uc54a\ub294\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" data-enlighter-theme=\"dracula\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$ python systrace.py -o output.html gfx input view wm am video hal dalvik\ncapturing trace... done\ndownloading trace... done\n\nTraceback (most recent call last):\n  File \"systrace.py\", line 286, in &lt;module>\n    main()\n  File \"systrace.py\", line 231, in main\n    decoded_chunk = dec.decompress(chunk)\nzlib.error: Error -3 while decompressing: incorrect header check<\/pre>\n\n\n\n<p>AOSP project\uc758 \uc774 <a href=\"https:\/\/android-review.googlesource.com\/#\/c\/55170\/\">\ub9c1\ud06c<\/a>\uc5d0 \ubcf4\uba74 \ubb38\uc81c\ub97c \ud574\uacb0\ud558\uae30 \uc704\ud55c patch\uac00 \uc62c\ub824\uc838 \uc788\ub294\ub370 comment\ub97c \ubcf4\ub2c8 \ud55c\ub3d9\uc548 \ubc1b\uc544\ub4e4\uc5ec \uc9c0\uc9c0 \uc54a\ub2e4\uac00 \ud604\uc7ac source\uc640 \ub2ec\ub77c\uc838\uc11c \uc801\uc6a9\ud560 \uc218 \uc5c6\uac8c \ub41c \ubaa8\uc591\uc774\ub2e4. \uac19\uc740 \ub3d9\uc791\uc744 \ud558\ub3c4\ub85d \uc57d\uac04\ub9cc \uc218\uc815\ud574\uc11c \uc774\ub807\uac8c \uace0\uccd0 \ubcf4\ub2c8 \uc880 \uc9c0\uc800\ubd84\ud558\uae34 \ud574\ub3c4 zlib error \uc5c6\uc774 Cygwin\uc5d0\uc11c systrace\ub97c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc5c8\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"diff\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">diff --git a\/systrace.py b\/systrace.py\nindex 387f413..0d3be25 100644\n--- a\/systrace.py\n+++ b\/systrace.py\n@@ -205,8 +205,12 @@ def main():\n       data = ''.join(data)\n\n       # Collapse CRLFs that are added by adb shell.\n-      if data.startswith('\\r\\n'):\n-        data = data.replace('\\r\\n', '\\n')\n+      if sys.platform == 'cygwin':\n+        if data.startswith('\\r\\r\\n'):\n+          data = data.replace('\\r\\r\\n', '\\n')\n+      else:\n+        if data.startswith('\\r\\n'):\n+          data = data.replace('\\r\\n', '\\n')\n\n       # Skip the initial newline.\n       data = data[1:]\n\ufeff<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>2014\ub144 8\uc6d4 \ud604\uc7ac, Cygwin\uc73c\ub85c systrace\ub97c \uc0ac\uc6a9\ud558\ub824\uace0 \ud558\uba74 zlib \uad00\ub828\ud55c error\uac00 \ub098\uba74\uc11c \ub3d9\uc791\ud558\uc9c0 \uc54a\ub294\ub2e4. AOSP project\uc758 \uc774 \ub9c1\ud06c\uc5d0 \ubcf4\uba74 \ubb38\uc81c\ub97c \ud574\uacb0\ud558\uae30 \uc704\ud55c patch\uac00 \uc62c\ub824\uc838 \uc788\ub294\ub370 comment\ub97c \ubcf4\ub2c8 \ud55c\ub3d9\uc548 \ubc1b\uc544\ub4e4\uc5ec \uc9c0\uc9c0 \uc54a\ub2e4\uac00 \ud604\uc7ac source\uc640 \ub2ec\ub77c\uc838\uc11c \uc801\uc6a9\ud560 \uc218 \uc5c6\uac8c \ub41c \ubaa8\uc591\uc774\ub2e4. \uac19\uc740 \ub3d9\uc791\uc744 \ud558\ub3c4\ub85d \uc57d\uac04\ub9cc \uc218\uc815\ud574\uc11c \uc774\ub807\uac8c \uace0\uccd0 \ubcf4\ub2c8 \uc880 \uc9c0\uc800\ubd84\ud558\uae34 \ud574\ub3c4 zlib error \uc5c6\uc774 Cygwin\uc5d0\uc11c systrace\ub97c \uc0ac\uc6a9\ud560 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[2],"tags":[11,32,121],"class_list":["post-1039","post","type-post","status-publish","format-standard","hentry","category-android","tag-android","tag-cygwin","tag-systrace"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/litcoder.com\/index.php?rest_route=\/wp\/v2\/posts\/1039","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/litcoder.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/litcoder.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/litcoder.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/litcoder.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1039"}],"version-history":[{"count":1,"href":"https:\/\/litcoder.com\/index.php?rest_route=\/wp\/v2\/posts\/1039\/revisions"}],"predecessor-version":[{"id":2747,"href":"https:\/\/litcoder.com\/index.php?rest_route=\/wp\/v2\/posts\/1039\/revisions\/2747"}],"wp:attachment":[{"href":"https:\/\/litcoder.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1039"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/litcoder.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1039"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/litcoder.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}