Profile

Cover photo
Sergei Trofimovich
Worked at VirusBlokAda Ltd.
Attended Belarusian State University
Lives in Minsk
107 followers|23,389 views
AboutPosts

Stream

Sergei Trofimovich

Shared publicly  - 
 
Ever wondered how 'perf top' looks on haskell programs?

Something like that: http://trofi.github.io/posts/192-perf-on-haskell-programs.html
perf on haskell programs. GHC 7.10.1 got a new -g option to generate debugging information in DWARF format for compiled haskell code. While the -g option was being developed I asked Peter a few times on #ghc how perf top would look like for a random haskell program.
5
Erik de Castro Lopo's profile photo
 
This is really interesting +Sergei Trofimovich. I hope there's some patches for GHC coming :).
Add a comment...

Sergei Trofimovich

Shared publicly  - 
 
Another weekend, another lotz of funz. Guest start is m68k:

http://trofi.github.io/posts/191-ghc-on-m68k.html

GHC on m68k. This all started from this ghc bug report. The bug stated that on m68k ABI return values of int-type are passed in register %d0 while void *-type are passed in register %a0. GHC's C codegen was not using return types consistently. I had zero knowledge of m68k at that time.
4
Erik de Castro Lopo's profile photo
 
That's somre really cool hacking Sergi. Congrats!
Add a comment...

Sergei Trofimovich

Shared publicly  - 
Add flag to optionally ignore ELF interposition. From: Jan Hubicka ; To: gcc-patches at gcc dot gnu dot org; Date: Tue, 20 May 2014 22:04:32 +0200; Subject: Add flag to optionally ignore ELF interposition; Authentication-results: sourceware.org; auth=none ...
1
Add a comment...

Sergei Trofimovich

Shared publicly  - 
glibc on ia64 or how relocations bootstrap. It was a rainy evening on #gentoo-ia64 and suddenly 00:40 < undersys> trying out glibc 2.21 on my ia64 box 00:41 < undersys> all compiles fine, gets to preinstall test and fails 00:41 < undersys> "simple run test (/usr/bin/cal) failed" wat :C ..
3
1
Lennart Kolmodin's profile photo
 
Interesting read, hairy horror story :)
Add a comment...

Sergei Trofimovich

Shared publicly  - 
 
Yesterday while nobody watched I've stabilised ghc-7.8.4 in #gentoo :
    https://bugs.gentoo.org/show_bug.cgi?id=524790#c23

Most of stuff should build/work fine.
This time we have regained keyword parity with other arches:
    alpha amd64 ia64 ppc ppc64 sparc x86

This post from last year contains some gory details on what has to be fixed: http://trofi.github.io/posts/187-fixing-ghc-on-sparc-ia64-and-friends.html

One of the cool things is the parallel --make in ghc (inferred from MAKEOPTS):
    https://gitweb.gentoo.org/repo/gentoo.git/tree/eclass/haskell-cabal.eclass#n367

Another is hardened support for threaded runtime (the main excuse to stabilise ghc :)

Have fun!
Created attachment 386264 [details, diff] Patch for cabal-install-1.18.0.3.ebuild /usr/bin/cabal fails to run on hardened profiles with mprotect enabled because it tries to create a rwx memory page: $ eix -ce cabal-install [I] dev-haskell/cabal-install (1.18.0.3{tbz2}[1]@08/10/14): The ...
1
Add a comment...
Have him in circles
107 people
Seemant Kulleen's profile photo
Stefanie Okoto's profile photo
Сергей Исаченко's profile photo
Виктория Исаченко's profile photo
elfen laid's profile photo
Yegor Yefremov's profile photo
Dmitry Andreevich's profile photo
Alexander Hudenko's profile photo
Олег Купреев's profile photo

Sergei Trofimovich

Shared publicly  - 
 
 
An update on my 2014 report.
New GCC is just around the corner. For me, as a GCC developer, this means a period of bugfixing, benchmarking and fine-tuning. Two years ago I wrote about my experiment of building libreoffice with link time optimization (LT...
View original post
1
Add a comment...

Sergei Trofimovich

Shared publicly  - 
PR other/60465 * config/ia64/ia64.c (ia64_expand_load_address): Use gprel64 for local symbolic operands. * config/ia64/predicates.md (local_symbolic_operand64): New predicate. PR othe...
5
Ondřej Súkup's profile photoSergei Trofimovich's profile photoАндрэй Захарэвіч's profile photo
3 comments
 
Віншую!
 ·  Translate
Add a comment...

Sergei Trofimovich

Shared publicly  - 
 
Did not write anything in a while.

A horror story for you of evil boots and shrunken stacks:
http://trofi.github.io/posts/188-grub-0.97-and-gcc-4.9.html

grub-0.97 and gcc-4.9. Once upon a time (actually the day before yesterday) i dropped an eye at freenode/#gentoo-dev IRC channel and noticed an unusual question: 21:18 <@_AxS_> gcc internals issue.. does anyone happen to know if gcc-4.9 -O2 treats trampolines differently than gcc-4.8 and ...
2
Peter Volkov's profile photoSergei Trofimovich's profile photo
2 comments
 
I view assembler as a thin layer on top of underlying architecture and operating system which does not require a separate study.

Thus i'd suggest heavyweight but very clear book by Andrew Tanenbaum on common principles of general-purpose processors:

http://www.pearsonhighered.com/educator/product/Structured-Computer-Organization/9780132916523.page

I did read it in russian :)

Once you are familiar with basic concepts you can just read data sheet by hardware vendors.

Example one from Intel: http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html

This one while being huge is nicely structured and contains all sorts of details. From basic computation model decription (register types, fancy modes of operation, FPU modes, etc.) to pseudocode for every instruction and more.

Of more advanced tricks i'd suggest to look at some docs from Agner Fog:

http://agner.org/optimize/#manuals

Add a comment...

Sergei Trofimovich

Shared publicly  - 
2
Erik de Castro Lopo's profile photo
 
Yep, thats a winner!
Add a comment...
People
Have him in circles
107 people
Seemant Kulleen's profile photo
Stefanie Okoto's profile photo
Сергей Исаченко's profile photo
Виктория Исаченко's profile photo
elfen laid's profile photo
Yegor Yefremov's profile photo
Dmitry Andreevich's profile photo
Alexander Hudenko's profile photo
Олег Купреев's profile photo
Work
Employment
  • VirusBlokAda Ltd.
    Very Serious Guy, 2006 - 2014
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
Minsk
Previously
Zhodino
Story
Tagline
bit master
Introduction
gentoo, haskell, c, exotic arches, natural languages.
snowboarding, (folk) music and more!
Education
  • Belarusian State University
    Radiophysics, 2002 - 2007
Basic Information
Gender
Male
Looking for
Friends, Networking