<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>Profilowanie</title>
<link rel="stylesheet" type="text/css" href="../../pintail-mallard-pl.css">
<script type="text/javascript" src="../../highlight.pack.js"></script><script>
document.addEventListener('DOMContentLoaded', function() {
  var matches = document.querySelectorAll('code.syntax')
  for (var i = 0; i < matches.length; i++) {
    hljs.highlightBlock(matches[i]);
  }
}, false);</script><script type="text/javascript" src="../../yelp.js"></script><meta name="robots" content="noindex">
</head>
<body lang="pl" dir="ltr">
<header class="gnome-header"><nav><div class="pagewide">
<a id="home-link" class="gnome-navbar-brand" href="../../index.html" title="Go to home page"><h1>GNOME Help</h1></a><details class="gnome-langs gnome-langs-wide"><summary title="Change language" aria-label="Change language"><span class="gnome-langs-current">pl</span></summary><ul>
<li><a href="profiling.html.ca">català</a></li>
<li><a href="profiling.html.cs">čeština</a></li>
<li><a href="profiling.html.da">dansk</a></li>
<li><a href="profiling.html.de">Deutsch</a></li>
<li><a href="profiling.html">English</a></li>
<li><a href="profiling.html.es">español</a></li>
<li><a href="profiling.html.eu">euskara</a></li>
<li><a href="profiling.html.fr">français</a></li>
<li><a href="profiling.html.id">Indonesia</a></li>
<li><a href="profiling.html.hu">magyar</a></li>
<li><a href="profiling.html.pl" aria-current="true">polski</a></li>
<li><a href="profiling.html.pt_BR">português (Brasil)</a></li>
<li><a href="profiling.html.sk">slovenčina</a></li>
<li><a href="profiling.html.sv">svenska</a></li>
<li><a href="profiling.html.el">Ελληνικά</a></li>
<li><a href="profiling.html.bg">български</a></li>
<li><a href="profiling.html.ru">русский</a></li>
<li><a href="profiling.html.sr">српски</a></li>
<li><a href="profiling.html.uk">українська</a></li>
<li><a href="profiling.html.kk">қазақ тілі</a></li>
<li><a href="profiling.html.ko">한국어</a></li>
</ul></details>
</div></nav></header><main><aside class="sidebar sidebar-left"><div class="sidebar-contents"><div class="inner">
<div class="title"><h2><span class="title">Spis treści</span></h2></div>
<div class="region"><div class="contents"><ul>
<li class="links"><a href="../../51/sysprof/index.html.pl" title="Sysprof">Sysprof</a></li>
<li class="links"><a href="../../51/sysprof/introduction.html.pl#what-is-a-profiler" title="Czym jest profiler?">Czym jest profiler?</a></li>
<li class="links"><a href="../../51/sysprof/introduction.html.pl" title="Wprowadzenie">Wprowadzenie</a></li>
<li class="links"><ul>
<li class="links links-head">Profilowanie</li>
<li class="links"><a href="../../51/sysprof/profiling.html.pl#interpreting-results" title="Interpretacja wyników">Interpretacja wyników</a></li>
<li class="links"><a href="../../51/sysprof/profiling.html.pl" title="Profilowanie">Profilowanie</a></li>
<li class="links"><a href="../../51/sysprof/profiling.html.pl#new-process-profiling" title="Profilowanie nowego procesu">Profilowanie nowego procesu</a></li>
<li class="links"><a href="../../51/sysprof/profiling.html.pl#sysprof-cli" title="Profilowanie za pomocą narzędzia wiersza poleceń sysprof-cli">Profilowanie za pomocą narzędzia wiersza poleceń sysprof-cli</a></li>
</ul></li>
<li class="links"><ul>
<li class="links links-head">Najczęściej zadawane pytania</li>
<li class="links"><a href="../../51/sysprof/faq.html.pl" title="Co oznacza „heap”?">Co oznacza „heap”?</a></li>
</ul></li>
</ul></div></div>
</div></div></aside><aside class="sidebar sidebar-right"><div class="sidebar-sections"><div class="inner">
<div class="title"><h2><span class="title">Na tej stronie</span></h2></div>
<div class="region"><div class="contents"><ul>
<li class="links "><a href="../../51/sysprof/profiling.html.pl#system-profiling" title="Jak profilować system">Jak profilować system</a></li>
<li class="links "><a href="../../51/sysprof/profiling.html.pl#new-process-profiling" title="Profilowanie nowego procesu">Profilowanie nowego procesu</a></li>
<li class="links "><a href="../../51/sysprof/profiling.html.pl#sysprof-cli" title="Profilowanie za pomocą narzędzia wiersza poleceń sysprof-cli">Profilowanie za pomocą narzędzia wiersza poleceń sysprof-cli</a></li>
<li class="links "><a href="../../51/sysprof/profiling.html.pl#interpreting-results" title="Interpretacja wyników">Interpretacja wyników</a></li>
</ul></div></div>
</div></div></aside><div class="page">
<header><div class="inner pagewide"><div class="trails" role="navigation"><div class="trail">
<a class="trail" href="../../index.html">GNOME</a> » <a class="trail" href="../../51/index.html">GNOME <span class="span">51</span></a> » <a class="trail" href="../../51/sysprof/index.html.pl" title="Sysprof">Sysprof</a> › <a class="trail" href="../../51/sysprof/index.html.pl#profiling" title="Profilowanie">Profilowanie</a> » </div></div></div></header><article><div class="hgroup pagewide"><h1 class="title"><span class="title">Profilowanie</span></h1></div>
<div class="region">
<div class="contents pagewide"></div>
<section id="system-profiling"><div class="inner">
<div class="hgroup pagewide"><h2 class="title"><span class="title">Jak profilować system</span></h2></div>
<div class="region"><div class="contents pagewide">
<p class="p">Profilując system, program <span class="app">Sysprof</span> nagrywa informacje o stosie dla wszystkich wykonywanych programów, w tym jądra Linux. Może to przeszkadzać, jeśli badany jest tylko jeden proces. Jeśli dany program nie korzysta za bardzo z systemu, to lepiej użyć programu <span class="app">Sysprof</span> do <span class="link"><a href="profiling#new-process-profiling" title="profiling#new-process-profiling">wywołania nowego procesu</a></span>.</p>
<p class="p">Aby profilować cały system, wybierz <span class="em">Wszystkie procesy</span> i kliknij <span class="em">Nagrywaj</span>.</p>
<p class="p">Na tym etapie może pojawić się prośba o <span class="em">upoważnienie</span> dostępu do profilowania systemu. Jest to wymagane, ponieważ implementacja „perf” jądra Linux wymaga uprawnień roota do profilowania całego systemu.</p>
<p class="p">Podczas sesji profilowania wyświetlane będą sekundy aktywności. Ponowne kliknięcie przycisku <span class="em">Nagrywaj</span> zatrzyma sesję. Po jej ukończeniu wyświetlony zostanie wykres wywołań.</p>
<div class="note" title="Uwaga">
<svg height="24" width="24" version="1.1">
 <g>
  <path class="yelp-svg-fill" d="m4 3h16c0.554 0 1 0.446 1 1v11h-6v6h-11c-0.554 0-1-0.446-1-1v-16c0-0.554 0.446-1 1-1z"></path>
  <path class="yelp-svg-fill" d="m17 16h4l-5 5v-4c0-0.554 0.446-1 1-1z"></path>
 </g>
</svg><div class="inner"><div class="region"><div class="contents"><p class="p">Jeśli program <span class="app">sysprof</span> pojawi się na wykresie, to należy rozważyć nagrywanie sesji profilowania za pomocą programu <span class="cmd">sysprof-cli</span>. To program wiersza poleceń, który zapisze sesję na dysku do przejrzenia później.</p></div></div></div>
</div>
<p class="p"><span class="link"><a href="profiling#interpreting-results" title="profiling#interpreting-results">Interpretacja wyników</a></span> zawiera więcej informacji.</p>
</div></div>
</div></section><section id="new-process-profiling"><div class="inner">
<div class="hgroup pagewide"><h2 class="title"><span class="title">Profilowanie nowego procesu</span></h2></div>
<div class="region">
<div class="contents pagewide">
<p class="p">Often times, you may need to spawn a new process to profile.
First, select the <span class="em">Application</span> button next at the top of the
recording window. Fill in your command and working directory, and optionally
specify any environment variables you need. Your process will be started
when recording begins.</p>
<div class="note" title="Uwaga">
<svg height="24" width="24" version="1.1">
 <g>
  <path class="yelp-svg-fill" d="m4 3h16c0.554 0 1 0.446 1 1v11h-6v6h-11c-0.554 0-1-0.446-1-1v-16c0-0.554 0.446-1 1-1z"></path>
  <path class="yelp-svg-fill" d="m17 16h4l-5 5v-4c0-0.554 0.446-1 1-1z"></path>
 </g>
</svg><div class="inner"><div class="region"><div class="contents"><p class="p">Jeśli wywoływany jest proces wymagający dostępu do bieżącego ekranu, taki jak program GTK, to ustaw opcję <span class="em">Dziedziczenie obecnego środowiska</span>.</p></div></div></div>
</div>
</div>
<section class="links" role="navigation"><div class="inner">
<div class="hgroup pagewide"></div>
<div class="contents pagewide"><div class="links guidelinks"><div class="inner">
<div class="title"><h3><span class="title">Więcej informacji</span></h3></div>
<div class="region"><ul><li class="links "><a href="../../51/sysprof/index.html.pl#profiling" title="Profilowanie">Profilowanie</a></li></ul></div>
</div></div></div>
</div></section>
</div>
</div></section><section id="sysprof-cli"><div class="inner">
<div class="hgroup pagewide"><h2 class="title"><span class="title">Profilowanie za pomocą narzędzia wiersza poleceń sysprof-cli</span></h2></div>
<div class="region">
<div class="contents pagewide">
<p class="p">Narzędzie wiersza poleceń <span class="cmd">sysprof-cli</span> używa jak najmniej zasobów komputera. Po wykonaniu bez parametrów nagra cały system i zapisze wyjście w pliku <span class="file">capture.syscap</span>, który można otworzyć za pomocą programu <span class="app">Sysprof</span>, aby wyświetlić wykres wywołań.</p>
<p class="p">If you would like to spawn a new process, use <span class="cmd">sysprof-cli --
'command'</span> to specify a command to be launched. The command will inherit
the current environment.</p>
</div>
<section class="links" role="navigation"><div class="inner">
<div class="hgroup pagewide"></div>
<div class="contents pagewide"><div class="links guidelinks"><div class="inner">
<div class="title"><h3><span class="title">Więcej informacji</span></h3></div>
<div class="region"><ul><li class="links "><a href="../../51/sysprof/index.html.pl#profiling" title="Profilowanie">Profilowanie</a></li></ul></div>
</div></div></div>
</div></section>
</div>
</div></section><section id="interpreting-results"><div class="inner">
<div class="hgroup pagewide"><h2 class="title"><span class="title">Interpretacja wyników</span></h2></div>
<div class="region">
<div class="contents pagewide">
<p class="p">Wyniki profilowania w programie <span class="app">Sysprof</span> są podzielone na trzy sekcje. Na górze po lewej znajduje się lista wszystkich profilowanych funkcji. Są one uporządkowane według częstości wywołania podczas nagrywania.</p>
<div class="note" title="Uwaga">
<svg height="24" width="24" version="1.1">
 <g>
  <path class="yelp-svg-fill" d="m4 3h16c0.554 0 1 0.446 1 1v11h-6v6h-11c-0.554 0-1-0.446-1-1v-16c0-0.554 0.446-1 1-1z"></path>
  <path class="yelp-svg-fill" d="m17 16h4l-5 5v-4c0-0.554 0.446-1 1-1z"></path>
 </g>
</svg><div class="inner"><div class="region"><div class="contents"><p class="p">Warto zauważyć, że czas spędzony w każdej funkcji nie jest przechwytywany. Tak dokładne nagrywanie wymagałoby profilera śledzącego. Procent jest obliczany przez określanie częstości pojawienia się funkcji w bieżącym śledzeniu stosu podczas nagrywania próbki.</p></div></div></div>
</div>
<p class="p">Po wybraniu funkcji z listy wszystkie nagrane wywołania tej funkcji zostaną wyświetlone na dole po lewej. One także są uporządkowane według procentu próbek, które zawierają tę funkcję w śledzeniu stosu.</p>
<p class="p">Po prawej znajdują się wszystkie elementy potomne wybranej funkcji. Można wybrać funkcję z listy funkcji lub z listy wywołań.</p>
<div class="note" title="Uwaga">
<svg height="24" width="24" version="1.1">
 <g>
  <path class="yelp-svg-fill" d="m4 3h16c0.554 0 1 0.446 1 1v11h-6v6h-11c-0.554 0-1-0.446-1-1v-16c0-0.554 0.446-1 1-1z"></path>
  <path class="yelp-svg-fill" d="m17 16h4l-5 5v-4c0-0.554 0.446-1 1-1z"></path>
 </g>
</svg><div class="inner"><div class="region"><div class="contents"><p class="p">If you see <span class="em">- - Context Switch - -</span> in your results, that means that the
application transitioned into or from the Linux kernel. There can be many reasons
for this such as a <span class="em">syscall</span> or <span class="em">signal</span>.</p></div></div></div>
</div>
</div>
<section class="links" role="navigation"><div class="inner">
<div class="hgroup pagewide"></div>
<div class="contents pagewide"><div class="links guidelinks"><div class="inner">
<div class="title"><h3><span class="title">Więcej informacji</span></h3></div>
<div class="region"><ul><li class="links "><a href="../../51/sysprof/index.html.pl#profiling" title="Profilowanie">Profilowanie</a></li></ul></div>
</div></div></div>
</div></section>
</div>
</div></section><section class="links" role="navigation"><div class="inner">
<div class="hgroup pagewide"></div>
<div class="contents pagewide"><div class="links guidelinks"><div class="inner">
<div class="title"><h2><span class="title">Więcej informacji</span></h2></div>
<div class="region"><ul><li class="links "><a href="../../51/sysprof/index.html.pl#profiling" title="Profilowanie">Profilowanie</a></li></ul></div>
</div></div></div>
</div></section>
</div>
<div class="clear"></div></article><footer><div class="inner pagewide"><div class="about ui-expander" role="contentinfo">
<div class="yelp-data yelp-data-ui-expander" data-yelp-expanded="false"></div>
<div class="inner">
<div class="hgroup"><h2><span class="title">Informacje</span></h2></div>
<div class="region"><div class="contents">
<div class="copyrights">
<div class="copyright">© 2017-2019 Piotr Drąg</div>
<div class="copyright">© 2017-2019 Aviary.pl</div>
</div>
<div class="credits">
<div class="credits-translators">
<div class="title"><span class="title">Przetłumaczone przez</span></div>
<ul class="credits">
<li>Piotr Drąg</li>
<li>Aviary.pl</li>
</ul>
</div>
<div class="credits-blank"></div>
<div class="credits-blank"></div>
</div>
</div></div>
</div>
</div></div></footer>
</div></main>
</body>
</html>
